Howard 0 Posted July 31, 2009 Hi. I'm trying to get this trigger which activates when fuel goes below 30% in multiplayer. I've tried a simple "fuel player < 0.3" in the condition but that didn't seem to work, this must also work for the 4 aircrafts I've placed on the map (_plane, _plane1, _plane2, _plane 3) Also, how do you make a trigger loop sound? I have made a trigger which plays a sound which will say "ALTITUDE, ALTITUDE" when you fly below 25, condition looks like this: ((getPos (vehicle player) select 2) < 26) and takeoff==1 (Takeoff is just something I need to have on when I get this working cause I don't want to be hearing the sound while on deck) What happens now is that when you fly below 25 the sound will play once, but it won't play again untill you fly over 25 and then back down under 25. I need to have it so that while you are under 25, the sound will continue playing untill you pop over 25 again. I hope you guys understand what the hell I'm talking about here, cause I sure don't! Share this post Link to post Share on other sites
JDog 11 Posted July 31, 2009 1) For the fuel issue... I'm guessing "player" wont work since there are multiple. Try using unit/character/plane names instead. 2) I'd recommend running a script for this instead. Keep the trigger and condition the same, but onAct, call a script. In the script run something like this (sorry, pseudo): while{player/plane is below 25}do{ playsound }; A while loop is the key, should make it keep looping until he regains altitude. Share this post Link to post Share on other sites
JDog 11 Posted July 31, 2009 What doesnt work? you didnt try typing the code as I have it there did you? >.> Share this post Link to post Share on other sites
Howard 0 Posted July 31, 2009 I guess you're going to have to explain a bit more detailed ;) Share this post Link to post Share on other sites
JDog 11 Posted July 31, 2009 lol what I posted there wasn't actual code, just thought concepts of how you should make your code cuz my brain hurt too much to try and figure it out at the time. realistically it should be something like this: Trigger condition: (getPos player select 2 < 26) AND (takeoff==1) Trigger on activation: nul=[] execVM "scriptts\altWarning.sqf"; //assuming it's within a "scripts" folder you've made Script (altWarning.sqf): while{ (getPos player select 2 < 26) AND (takeoff==1) }do{ //whatever line of code plays your sound, "say" i guess? //put a sleep here that is the duration of your sound, so it doesnt start playing and overlapping itself }; Share this post Link to post Share on other sites
Howard 0 Posted August 1, 2009 Works perfectly, thanks Share this post Link to post Share on other sites
Cellus 10 Posted August 1, 2009 For the fuel check (example in .sqs). Just look up vehicle-only broadcasting so everyone doesn't get the message when you're low on fuel or altitude. Share this post Link to post Share on other sites