Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 08-20-2009, 05:44 PM   #1
public_slots_free
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
No self damage from rockets

I want to do no self damage from rockets. I know this is possible however here is the tricky part. I want another team's rockets to hurt and also your own grenades. Pretty much I want to be able to rj all over the place and still fight.
public_slots_free is offline   Reply With Quote


Old 08-20-2009, 11:31 PM   #2
Ricey
UI Designer
Front-End Developer
Fortress Forever Staff
 
Ricey's Avatar
 
Join Date: May 2008
Location: Winter Park, FL
Class/Position: D Eng
Gametype: CTF 9v9
Affiliations: .gr , smr
Posts Rated Helpful 46 Times
http://forums.fortress-forever.com/s...=ff_sa_extreme

just need to add damage for grenades :P



err, the download link doesnt work ><
__________________
Support FF:
Maps : Haste |Scrummage |Mulch_Trench
Voltage | Exchange Classic | Fortsake
ricecakes: I demand SGs get a buff
squeek.: buy it a gym membership


'I have an eye for design' - Kube 2014

Last edited by Ricey; 08-20-2009 at 11:37 PM.
Ricey is offline   Reply With Quote


Old 08-20-2009, 11:52 PM   #3
Sidd
Lua Team
 
Join Date: Mar 2007
Posts Rated Helpful 1 Times
Code:
function player_ondamage( player, damageinfo )
	-- if no damageinfo do nothing
	if not damageinfo then return end
	local inflictor = damageinfo:GetAttacker()
	local weapon = damageinfo:GetInflictor():GetClassName()
	if damageinfo:GetDamageType() == 32 then 
		-- no fall damage
		damageinfo:SetDamage(0)
	elseif weapon == "ff_projectile_rocket" and inflictor:GetTeamId() == player:GetTeamId() then 
	    -- no rocket damage from the same team
		damageinfo:SetDamage(0)
	end
end

Last edited by Sidd; 08-21-2009 at 05:33 PM. Reason: fix the sillylua :/
Sidd 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 04:26 AM.


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