Is it possible to spawn a trigger_hurt or any sort of trigger that will hurt the player after an event has happened?
Basically i've created an OBJ map where the allies have to steal some docs and launch a V2. The V2 moves to over a launch pit, there there is a fire effect and the V2 takes off.
What I want is a way to hurt the player if he is in the V2 launch pit under
the flames.
This would only happen after the flames have started.
I don't mind if it has to be done in Radiant or scripted.
Any ideas anyone?
Thanks
Spawn a trigger_hurt after an event?
Moderator: Moderators
-
Waylander76
- Sergeant Major
- Posts: 122
- Joined: Wed Jun 01, 2005 10:03 am
-
@(...:.:...)@
- Corporal
- Posts: 37
- Joined: Wed Nov 23, 2005 3:42 pm
- Location: Cambridge UK
Hi,
I would make it a mixture of both, but you could do it purely with scripting.
Radiant & script would be easiest. Ok, do it like this:
1) Make your trigger hurt in radiant. In the entity options thing, setup the damage type and amount. Also set a targetname of whatever you want. eg
targetname
firehurt
Ok, then compile your map etc etc.
Now, in your map script, put this line under wait till prespawn:
That will mean the trigger cannot be triggered, so it won't hurt anyone.
Now, go to the section of your script which makes the fire appear, and the rocket take off. Put this line where the fire appears:
That will make the trigger triggerable so that it can hurt people.
I don't know how your script works with the fire, but if you have a set delay of say 10 seconds, then the flames are removed; put the nottriggerable line where the flames are removed.
If the flames just disappear by themself, you could do this:
Instead of the
line, start a thread instead:
The thread firehurt should be like this:
Cya
I would make it a mixture of both, but you could do it purely with scripting.
Radiant & script would be easiest. Ok, do it like this:
1) Make your trigger hurt in radiant. In the entity options thing, setup the damage type and amount. Also set a targetname of whatever you want. eg
targetname
firehurt
Ok, then compile your map etc etc.
Now, in your map script, put this line under wait till prespawn:
Code: Select all
$firehurt nottriggerable
Now, go to the section of your script which makes the fire appear, and the rocket take off. Put this line where the fire appears:
Code: Select all
$firehurt triggerable
I don't know how your script works with the fire, but if you have a set delay of say 10 seconds, then the flames are removed; put the nottriggerable line where the flames are removed.
Code: Select all
$firehurt nottriggerable
Instead of the
Code: Select all
$firehurt triggerable
Code: Select all
thread firehurt
Code: Select all
firehurt:
$firehurt triggerable
wait 10 //wait until the fire has gone
$firehurt nottriggerable
//or you could just remove it if you don't need it again
//$firehurt remove
end

<3 arrays.
-
Waylander76
- Sergeant Major
- Posts: 122
- Joined: Wed Jun 01, 2005 10:03 am
-
@(...:.:...)@
- Corporal
- Posts: 37
- Joined: Wed Nov 23, 2005 3:42 pm
- Location: Cambridge UK