Jump to content

Home

Can I add a timer to a trigger?


Gronda

Recommended Posts

Hi, I'm relatively new to level editing and so this may be a simple thing but I haven't been able to find a way of doing it.

 

I have a set of forcefields linked to a trigger and to a func_static. When I hit the trigger or use force-push one forcefield turns off and the others turn on. So far so good as this is what I want to happen.

 

However, what I want as a next step is that after x seconds have passed, the whole thing switches back to its initial state.

 

I managed this with the trigger by simply creating a second identical trigger and adding a delay of 5. But this only works when the trigger is hit by the player in-game, not with the force-push.

 

Is there a solution to this?

 

Thanks.

Link to comment
Share on other sites

I have never done any timed stuff, but there is an entity called target_delay, which waits for a set amount of time before triggering its targets, say your forcefields had a targetname of "forcefield", and your trigger had a target of "forcefield", then if you had a target_delay, with a targetname of "forcefield" it would trigger itself every 5 seconds, and your forcefields would then switch every 5 seconds. I really don't know how to fire multiple targets from one target key, but if there is a way then this is possible cause your trigger could fire both "forcefield" and "forcefield_delay", and then the target_delay called "forcefield_delay" with a "wait" of 5 could then target the original "forcefield" and therefore switching the forcefields back to their original state.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...