Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 01-15-2008, 07:52 PM   #1
Tyrant
Beta Tester
 
Tyrant's Avatar
 
Join Date: Mar 2007
Location: Winnipeg Manitoba
Posts Rated Helpful 0 Times
How too..

How do you make it so You don't deal damage to yourself. From Grenades, rockets? Is this possible?
Tyrant is offline   Reply With Quote


Old 01-20-2008, 04:49 PM   #2
own3r
Custom mapper
 
own3r's Avatar
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
Not sure, but it is possible to have an brush entity which gives you hp or whatever you like every so many seconds, lets say every second.
own3r is offline   Reply With Quote


Old 01-20-2008, 08:43 PM   #3
A1win
Nutcracker
 
A1win's Avatar
 
Join Date: Sep 2007
Location: Kuopio, Finland
Posts Rated Helpful 0 Times
Send a message via MSN to A1win
Code:
function player_ondamage( player, damageInfo )

	-- Entity that is attacking
	local attacker = damageInfo:GetAttacker()

	-- If no attacker do nothing
	if not attacker then return end

	-- If attacker is a player do nothing
	if not IsPlayer(attacker) then return end
	
	local playerAttacker = CastToPlayer(attacker)
	
	-- If player is damaging self do nothing
	if player:GetId() == playerAttacker:GetId() then return end
	
end
A1win is offline   Reply With Quote


Old 01-21-2008, 01:17 AM   #4
TheWetMule
 
TheWetMule's Avatar
 
Join Date: Mar 2007
Location: England, Midlands
Posts Rated Helpful 0 Times
Send a message via MSN to TheWetMule Send a message via Skype™ to TheWetMule
Now get quad working at the same time
TheWetMule is offline   Reply With Quote


Old 01-28-2008, 11:46 AM   #5
stino
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
how too make it so your grenades only affect yourself? (usefull for concmaps)
stino is offline   Reply With Quote


Old 01-29-2008, 01:37 AM   #6
trepid_jon
Ray Ray Johnson
Fortress Forever Staff
 
trepid_jon's Avatar
 
Join Date: Feb 2005
Location: Dallas, TX
Class/Position: D Civilian
Gametype: Rocket Jousting
Affiliations: EAFD
Posts Rated Helpful 78 Times
Send a message via ICQ to trepid_jon Send a message via AIM to trepid_jon
ff_waterpolo.lua has some invincible & quad damage shit going on if you want to reference it.
__________________
Support FF:
Trepid
steamcommunity.com/id/trepid_jon/
trepid_jon is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:29 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.