Trigger when map starts
Trigger when map starts
I need to make a trigger that fires when the map loads or restarts. I want to target a bunch of entities that will basically start a relay/delay system, so the trigger has to be dependable. I setup a func_timer with spawnflags=1 (start_on), wait=0 and I get this message, "func_timer at ( x y z ) has random >= wait". If I set random=0, then the message does not appear. I don't think this is an error and it seems to work correctly in both instances. Would this be a reliable way of triggering entities on a map_restart?
Re: Trigger when map starts
'trigger_always' entity always fires whenever you load the map or restart.
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
Re: Trigger when map starts
Is there a difference in the way 'trigger_always' & 'func_timer' entities trigger their targets? I setup a 'trigger_always' and it appears to work the same as 'func_timer' with wait=0,random=0, & spawnflags=1 (start_on). I'm guessing that they call the same code when the level starts. My concern is that clients may not receive the trigger immediately when the map restarts while playing online. Would one trigger method be preferred over the other?
Re: Trigger when map starts
I have a few questions about triggers.
1) Do all entities and triggers (buttons, delays, timers, doors, targets) always get reset when a map restarts?
2) For mods, will a 'trigger_always' that triggers a relatively complex relay system work the same way?
3) If you want different relay systems for each gametype (DM, TDM, CTF), will using a 'trigger_always' with a different gametype key work with mods?
A few thoughts about questions three. You could have different 'trigger_always' for DM, TDM, CTF. Only one of these relay system would start depending on the gametype key. Only problem would be if the gametype is not DM,TDM,CTF. So, if it's a mod that specifies a different gametype or tourney mode, the relay system would not trigger which could cause problems if targetShader remaps are required.
Instead, have one global 'trigger_always' that triggers regardless of gametype key. This global 'trigger_always' would then be relayed using 'target_relay' to a DM, TDM, or CTF relay system depending on the gametype key. If these relay systems share a button, targetShader remap or target_speaker, you could target any common entities regardless of which gametype relay system was initiated. This way, if the gametype is not DM,TDM,CTF, the base relay system will always be triggered and depending on the gametype, a different relay system could be triggered for the appropriate gametype.
1) Do all entities and triggers (buttons, delays, timers, doors, targets) always get reset when a map restarts?
2) For mods, will a 'trigger_always' that triggers a relatively complex relay system work the same way?
3) If you want different relay systems for each gametype (DM, TDM, CTF), will using a 'trigger_always' with a different gametype key work with mods?
A few thoughts about questions three. You could have different 'trigger_always' for DM, TDM, CTF. Only one of these relay system would start depending on the gametype key. Only problem would be if the gametype is not DM,TDM,CTF. So, if it's a mod that specifies a different gametype or tourney mode, the relay system would not trigger which could cause problems if targetShader remaps are required.
Instead, have one global 'trigger_always' that triggers regardless of gametype key. This global 'trigger_always' would then be relayed using 'target_relay' to a DM, TDM, or CTF relay system depending on the gametype key. If these relay systems share a button, targetShader remap or target_speaker, you could target any common entities regardless of which gametype relay system was initiated. This way, if the gametype is not DM,TDM,CTF, the base relay system will always be triggered and depending on the gametype, a different relay system could be triggered for the appropriate gametype.