Alert23 215 Posted June 12, 2017 Hi all, how can i make a Trigger to be enabled after certain time passed? example: i placed an Trigger and now i want the Trigger to NOT be able to activate even if the condition is met except after a certain time passed. ps: i dident find any solution to this on the Net. Share this post Link to post Share on other sites
sarogahtyp 1105 Posted June 12, 2017 What's the starting time? Mission start?sent from mobile using Tapatalk Share this post Link to post Share on other sites
Alert23 215 Posted June 12, 2017 no its not the Mission start, what exactly do you mean by starting time? Share this post Link to post Share on other sites
sarogahtyp 1105 Posted June 12, 2017 You have a delay. Let's say 5 minutes after the trigger is able to activate. When does that delay begin? sent from mobile using Tapatalk Share this post Link to post Share on other sites
Alert23 215 Posted June 12, 2017 Hmm i guess its Mission Start then? to be honest i dont know about that delay, but the trigger Timer is set to [0,0,0] i dident set any time or timer. Share this post Link to post Share on other sites
sarogahtyp 1105 Posted June 12, 2017 What do you want to achieve? Do you need a trigger that can be enabled some time after mission start? Is it some time after the server has started the mission or is it some time after the player has started the mission? Share this post Link to post Share on other sites
Alert23 215 Posted June 12, 2017 yes exactly, i want the trigger to be enabled when the condion is met after a certain time passed after the server started the mission. Share this post Link to post Share on other sites
sarogahtyp 1105 Posted June 12, 2017 Is it some time after the server has started the mission or is it some time after the player has started the mission? EDIT: this is an important difference because a player could connect much time later after the mission was started by server... Share this post Link to post Share on other sites
beno_83au 1362 Posted June 12, 2017 Condition: _yourCondition && (time > _requiredTimeAfterMissionStarts) this && (time > 60) //will activate when the trigger is activated but only if the mission has been running for 60 seconds Share this post Link to post Share on other sites
sarogahtyp 1105 Posted June 12, 2017 7 minutes ago, beno_83au said: Condition: _yourCondition && (time > _requiredTimeAfterMissionStarts) this && (time > 60) //will activate when the trigger is activated but only if the mission has been running for 60 seconds did u consider the wiki notice? Posted on 30 Oct 2013 Dr Eyeball Arma 3 JIP bug: As of Arma 3 v1.02, for JIP clients 'time' value will start off counting from 0, not the real 'time' value. After about 2.5sec (on average), it will then jump to a high value and synchronise with the real 'time' value, which could be 900, for example. Therefore, do not use 'time' for any start of mission init timeouts; it's unreliable. (It's odd that it doesn't synchronise at the same time as public variables.) If this bug still occurs then your solution wont work. Preassumed I understood that notice aright. EDIT @Alert23 the question remains... do we talk bout servers mission start or clients mission start? Share this post Link to post Share on other sites
beno_83au 1362 Posted June 12, 2017 1 minute ago, sarogahtyp said: did u consider the wiki notice? If it's for the mission I'm thinking of, then there is likely to be no JIP. But, I haven't looked into any JIP stuff for ages so no, that bug hadn't crossed my mind. Share this post Link to post Share on other sites
Alert23 215 Posted June 12, 2017 16 minutes ago, sarogahtyp said: Is it some time after the server has started the mission or is it some time after the player has started the mission? EDIT: this is an important difference because a player could connect much time later after the mission was started by server... yes indeed its and important difference but i guess it would be good to know both solutions then. but i need it for Mission start only i think. 12 minutes ago, beno_83au said: Condition: _yourCondition && (time > _requiredTimeAfterMissionStarts) this && (time > 60) //will activate when the trigger is activated but only if the mission has been running for 60 seconds hmm i will try this. Share this post Link to post Share on other sites
pierremgi 4739 Posted June 12, 2017 You could add a trigger for some event during your mission : count allPlayers > 0 or else, presence of players on the start line, or anywhere else, with a delay if you need it. A trigger "server only" is probably better in this case. Share this post Link to post Share on other sites
Squirtman 5 Posted June 13, 2017 Here is another method of accomplishing this without using the "time" command and thereby avoiding any bugs it carries with it. Timer starts on server launch place an object somewhere in the world (doesn't matter what it is) give it a variable name(in this example "timer" without quotes) uncheck enable damage under object:special states to prevent it being destroyed by accident uncheck show model if you don't want it to be visible but that is optional place an empty marker where you want your trigger to be and give it a name (in this example "triggerlocation" without quotes) put whatever code you want the trigger to execute into a script (in this example "script.sqf") place a trigger somewhere in the world. type = none, activation = none, check server only to prevent it possibly executing multiple times in the condition field put "alive timer"(no quotes) in the activation field place the code located below in the trigger timer section select timeout and enter the delay time you want in seconds in the min, mid, max boxes to start the timer when at least one player is present do the same as above starting on step 5 an put "count allplayers > 0"(no quotes) in the condition field of the trigger if (isServer) then { _trig1 = createTrigger["EmptyDetector", getmarkerpos "triggerlocation"]; //creates a trigger at marker triggerlocation _trig1 setTriggerArea [10,10,-1,false]; //[x radius, y radius, z height, is rectangle] _trig1 setTriggerActivation ["WEST", "PRESENT", false]; //[by, type, repeating] check link below for more information _trig1 setTriggerStatements ["this", "execvm 'script.sqf'", "this"]; //[condition, activation, deactivation] all must have something in them }; when the mission has been loaded for the amount of time you set in step 10 it will create a trigger that is activated upon BLUFOR present I would recommend checking command list for the syntax of the commands in the code should you want to change anything about the trigger being created Share this post Link to post Share on other sites
Joe98 90 Posted June 13, 2017 Study the trigger screen. Within the trigger screen you can set the amount of time: Once the trigger conditions are met you can set the delay so the trigger only fires 5 seconds or 5 minuted or whater time after. . Share this post Link to post Share on other sites
pierremgi 4739 Posted June 13, 2017 Place a first trigger condition: true, none none, name it trig1 or else, add any delay you want , nothing in act & deact fields. This trigger is your timer. place your working trigger as you want for the aim you want. Just add in the condition field triggerActivated trig1 (looks like <your condition> && triggerActivated trig1) That's all. Share this post Link to post Share on other sites
Alert23 215 Posted June 14, 2017 okay thank you all guys ill definitely try it out. however i found this on youtube and wanted to ask if someone could tell me pls how this is possible cause as im creating an race track right now and this will come rly handy in creating very fun tracks. sry i know its offtopic but i dident want to create a new thread for this Share this post Link to post Share on other sites
killzone_kid 1326 Posted June 14, 2017 use enableSimulation command Share this post Link to post Share on other sites
sarogahtyp 1105 Posted June 15, 2017 use enableSimulation commandSorry but I don't get how enableSimulation helps to achieve those kind of automatically race track creation.Maybe u could give some further explanations?sent from mobile using Tapatalk Share this post Link to post Share on other sites
killzone_kid 1326 Posted June 15, 2017 4 minutes ago, sarogahtyp said: Sorry but I don't get how enableSimulation helps to achieve those kind of automatically race track creation. Maybe u could give some further explanations? On 2017-6-12 at 2:07 PM, Alert23 said: how can i make a Trigger to be enabled after certain time passed? On 2017-6-14 at 5:32 AM, killzone_kid said: use enableSimulation command Yes? Share this post Link to post Share on other sites
sarogahtyp 1105 Posted June 15, 2017 24 minutes ago, killzone_kid said: Yes? Maybe! It could be my own issue but for me ur answer is way too short to understand it fully. But I'll try. Do u mean one should use pierremgi's solution but add trig2 enableSimulation true; in the OnAct field of trig1 ? and in some init event script: trig2 enableSimulation false; Is this what u mean? Share this post Link to post Share on other sites
pierremgi 4739 Posted June 15, 2017 1 hour ago, sarogahtyp said: Maybe! It could be my own issue but for me ur answer is way too short to understand it fully. But I'll try. Do u mean one should use pierremgi's solution but add trig2 enableSimulation true; in the OnAct field of trig1 ? and in some init event script: trig2 enableSimulation false; Is this what u mean? You can use enableSimulation command on triggers since v 1.53. On the other hand, I gave you a simple working solution. I takes 3 minutes to test it.... I should try laconic answers too. Share this post Link to post Share on other sites
sarogahtyp 1105 Posted June 15, 2017 1 minute ago, pierremgi said: You can use enableSimulation command on triggers since v 1.53. On the other hand, I gave you a simple working solution. I takes 3 minutes to test it.... I should try laconic answers too. I know that and I won't test it because ive to test my own things and have not the time to test anyones suggestions. I'm not the op. I just try to understand different solutions for given problems... Share this post Link to post Share on other sites
Alert23 215 Posted June 15, 2017 First of all THX to all who replyed with the intentions to help =) i dident Know that it is possible using EnableSimulation on triggers i will defintly try this but i think it should work. 1 Share this post Link to post Share on other sites