lonesoldier 0 Posted May 16, 2002 Ok. How can i have a trigger that is only active for a certain amount of time. I need to know this as i have an easter egg, and if you do not kill a certain guard in a limited amount of time, then the easter egg cannot be found. So how do i give the trigger a timer, and after, say 55 seconds it cant be activated. Share this post Link to post Share on other sites
LauryThorn 0 Posted May 16, 2002 Command time gives you the elapsed time from the mission start, in seconds. If that 55 seconds is from the mission start, you can use something like this in the trigger's condition field: ( !alive eOff ) && ( time <= 55 ) Now the trigger activates only, if the eOff[/] is killed within the first 55 seconds of the mission. Further questions? Share this post Link to post Share on other sites
FallenPaladin 0 Posted May 16, 2002 Well, that`s good information!! Had some problems with timing triggers myself Share this post Link to post Share on other sites
lonesoldier 0 Posted May 16, 2002 Well. Could you explain what each command will do, plus what triggers to put it in. What i want to do is this: If you save the hostage in the barn within a certain time limit (you save him by killing his captor) then you get a special gun. Sort of like the time cheats in goldeneye. Share this post Link to post Share on other sites
LauryThorn 0 Posted May 16, 2002 What kind of weapon would you like to add for the player? You need to make a trigger like this. In "condition" field, put: ( !alive captor ) && ( time <= 55 ), assuming that the enemy captor's name is "captor". I am not sure about this part, but try it out: In "on activation" field, put player removeWeapon "M16"; player removeMagazines "M16"; player addMagazine "G36amag"; player addMagazine "G36amag"; player addMagazine "G36amag"; player addMagazine "G36amag"; player addWeapon "G36a"; hint "Easter egg activated!", assuming that player has M16 as his primary weapon. Share this post Link to post Share on other sites
Chris Death 0 Posted May 16, 2002 Well, here's another suggestion; The previous given suggestion would only work, from the start of the mission, mine you could also use sometimes during the misison. Setup a trigger for the rescue of the hostage, and in the onActivation field type: bonus=bonus+1 :note - bonus is a variable, and should be 0 at the start, to get sure it is, you could also initialize it by init.sqs, or an init trigger (condition: true)/activation field: bonus=0 Once the hostage is rescued, the variable bonus will increase by the value of 1 - this means bonus=0+1, ==> 1 Setup another trigger, which will execute the easter-egg, condition: bonus == 1 onActivation field: what you want to do there (addweapon ....etc.) Now the tricky thing: create a gamelogic give it a waypoint with a timeout of max: 55 min: 55 avg: 55 make a second waypoint, and in the activation field type: bonus=2 What will happen? The gamelogic waits 55 seconds at waypoint 1, and jumps then to waypoint 2, where the variable bonus becomes the value 2. If you rescue the hostage now, the value of 1 would be added to the value of 2 ==> 3 Your easter egg trigger is waiting for the value of 1, and this could not happen anymore. If you want to activate this as a part, while the mission is already running, you need one more waypoint for the gamelogic, which should be waypoint 1 then, and for this first waypoint you need a condition or syncronization with a trigger. It should look this way then: wp1: gamelogic will wait there, until you want your 55 seconds countdown to be activated wp2: 55/55/55 timeout wp3: activation field: bonus=2 hope this is clear to understand ~S~ CD Share this post Link to post Share on other sites
lonesoldier 0 Posted May 17, 2002 Thanks Guys!!! I'll try out both and see what happens. Thanks! Share this post Link to post Share on other sites