12-17-2007, 12:15 AM | #1 |
Join Date: Dec 2007
Posts Rated Helpful 0 Times
|
dmg command
what is a command to put in the lua to make a trigger_ff_script do dmg to a player/ or just kill them if they touch it?
|
|
12-17-2007, 02:27 AM | #2 |
Nutcracker
|
I think the only way is to use a trigger_hurt. You can still add an "allowed" function for it in the lua file to check which players will take damage from it.
|
|
12-17-2007, 03:54 AM | #3 |
Join Date: Dec 2007
Posts Rated Helpful 0 Times
|
so if i put in a trigger_hurt i can add a command in the lua so it only hurts one team any one know what that command my be?
|
|
12-17-2007, 02:53 PM | #4 |
Nutcracker
|
Code:
teamhurt = trigger_ff_script:new({ team = Team.kUnassigned}) redteamhurt = teamhurt:new({ team = Team.kRed}) blueteamhurt = teamhurt:new({ team = Team.kBlue}) function teamhurt:allowed( allowed_entity ) if IsPlayer( allowed_entity ) then local player = CastToPlayer( allowed_entity ) if player:GetTeamId() == self.team then return EVENT_ALLOWED end end return EVENT_DISALLOWED end |
|
12-17-2007, 11:45 PM | #5 |
Join Date: Dec 2007
Posts Rated Helpful 0 Times
|
thanks alot man that works nice almost done with the map now woot
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|