Kenai Phoenix 4 Posted June 14 Hello! I have been playing with the ArmA 3 editor for a while, but I never got into the scripting part of it until now. I was tying to made a simple mission where the player takes off from a carrier, and then some enemy planes activate. If these planes reach one trigger zone, the mission fails. My approach was a really simple one (Im just beggining): - Make a start trigger zone where the player spawns (The carrier and a little more), and set it up to "any player" and "Not present" - To all enemy planes I added the init code: "this enableSimulation false; this hideObject true" -And on the effect of the trigger, set opposite of these two variables -Set the trigger on the zone were the enemy planes are heading: if "OPFOR is present" then "mission failed" Now, that didnt work, the enemy planes keep spawing and reaching their destination. After some googling I read I could use enableSimulationGlobal instead of enableSimulation. But it didnt work either. I added a "hint" on the player leave trigger to test if it is working properly, and it works as intended: the hint appears when the player leaves the zone. What can be the cause of this problem? there are 4 planes and 2 of them have a co-pilot AI, but I keep seeing them spawning and, if I dont do anything (aka, the trigger doesnt jump) i keep failing the mission meaning the AI somehow got to their destination. I tested this approach on smaller units, so I can see the effects of the code more easily, and it worked. But with planes there is no luck. Thanks, and sorry if this question is really simple Share this post Link to post Share on other sites
pierremgi 4889 Posted June 14 "this enableSimulation false; this hideObject true" is a string, not a code. code could be : this enableSimulation false; this hideObject true; but that will not work for your aim. You need to set a name on your enemy group like : redGroup (in init field of the group composition) Then in init field (or anywhere for init): {vehicle _x enableSimulation false; vehicle _x hideObject true} forEach units redGroup; then, in your trigger: {vehicle _x enableSimulation true; vehicle _x hideObject false} forEach units redGroup; Use global command (on server only), for MP session. Useless in SP. 2 Share this post Link to post Share on other sites
Kenai Phoenix 4 Posted June 16 On 6/14/2024 at 8:42 AM, pierremgi said: "this enableSimulation false; this hideObject true" is a string, not a code. code could be : this enableSimulation false; this hideObject true; but that will not work for your aim. You need to set a name on your enemy group like : redGroup (in init field of the group composition) Then in init field (or anywhere for init): {vehicle _x enableSimulation false; vehicle _x hideObject true} forEach units redGroup; then, in your trigger: {vehicle _x enableSimulation true; vehicle _x hideObject false} forEach units redGroup; Use global command (on server only), for MP session. Useless in SP. Thank you! It give me more information about what was happening and how to use arma scripting, but I was still having problems with the script. In the end my ArmA 3 was working weirdly, asking about ";" on scripts that were perfectly and other stuff so I made a new installation. In that case I realize I also added on the mod list "Drongos Air Operation" (an awesome mode btw) that could be causing some issues... and it was that. I unloaded and everything worked perfectly. I leave this here in case someone finds themselves with the same issue. Thanks you again anyways! 2 Share this post Link to post Share on other sites
pierremgi 4889 Posted June 16 15 minutes ago, Kenai Phoenix said: In the end my ArmA 3 was working weirdly, asking about ";" The code works. Probably due to a copy/paste here, as far as the forum editor adds invisible characters. (same for this post) 1 Share this post Link to post Share on other sites