fin_soldier 82 Posted October 12, 2018 Hey, I'm working on a horror mission with puzzles. The trouble has to do with some scripts due to my knowledge. I have one trigger playing a sound. The sound is 21 seconds long. Once the sound trigger has been activated, the player has to go and activate another trigger within those 21 seconds. The second trigger should be activated only when the sound is being played. I'm asking for a solution for the condition field of the second trigger. I'm thinking of something like: this && while {true} do (or something like this) Puzzle idea from Amnesia: The Dark Descent. Link to video: https://youtu.be/dLTcEDjR4VY?t=408 Highly appreciate your help, and thanks in advance! :) Share this post Link to post Share on other sites
davidoss 550 Posted October 12, 2018 this && triggerActivated playsoundtrigger 1 Share this post Link to post Share on other sites
fin_soldier 82 Posted October 14, 2018 On 12.10.2018 at 6:44 PM, davidoss said: this && triggerActivated playsoundtrigger I'm sorry, I don't quite get it. Should I replace "playsoundtrigger" with the audio file name? Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted October 14, 2018 Would be easier to do using a simple function instead of a trigger: //inside a spawned function: playSound "YourSound"; _duration = 21; _timeOut = time + _duration; TAG_fnc_puzzleSolved = false; waitUntil {time > _timeOut OR TAG_fnc_puzzleSolved}; if (time < _timeOut AND TAG_fnc_puzzleSolved) exitWith {hint "Puzzle solved!"}; hint "Puzzle failed";//will only show if the time is up without the puzzle solved Cheers 2 Share this post Link to post Share on other sites
HazJ 1288 Posted October 14, 2018 You can't check if X sound (alarm for example) was played as such. You can only check if trigger/script/function/etc run. As @davidoss and @Grumpy Old Man said. Share this post Link to post Share on other sites
fin_soldier 82 Posted October 15, 2018 First of all I want to thank you all for your interest in helping! :) Someone told me I didn't explain the specifics so here's more: The triggers are to be specific hold action triggers. Here's trigger A: Quote [generator, "push", "images\hand.paa", "images\hand.paa", "player distance generator < 3", "player distance generator < 3", {}, {}, {playsound "generator";}, {}, [], 2, 0, true, false ] remoteExec ["BIS_fnc_holdActionAdd"]; Trigger A, simply all it does is playsound. When Trigger A is activated, within 21 seconds you'll have to run to Trigger B. Trigger B: Quote [vent, "press", "images\hand.paa", "images\hand.paa", "player distance vent < 3", "player distance vent < 3", {}, {}, {roof = "done";}, {}, [], 1, 0, true, false ] remoteExec ["BIS_fnc_holdActionAdd"]; Trigger B sends roof == "done" to condition of the puzzle solution (Trigger C). But Trigger C will only activate while Trigger A is playing the sound, and Trigger B has been activated. I have a solution in mind, if there's a way to disable and enable a trigger? I want the thing to be repeatable, so if you fail you'll simply need to repeat the process. Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted October 15, 2018 42 minutes ago, fin_soldier said: I have a solution in mind, if there's a way to disable and enable a trigger? You can only check if a trigger is activated, no commands to activate a trigger, since that would be nonsensical. A simple function might be all you need. Cheers Share this post Link to post Share on other sites