TEMPEST.114 Posted June 4, 2024 Posted June 4, 2024 Someone was asking about this box in the main M.E. channel. As I was explaining it for them, I tested it out, because you know... DCS and the DCS ME manual can be deceiving... Here's the script I created to create a CONDITIONAL that returns either a TRUE or a FALSE. groupConditionTestScript.lua It IS loaded via the 'Initialisation Script' box in the Trigger Rules dialog as per the manual. It is called from the CONDITION box on the GROUP Inspector just to the left of the % spawn box. Even if you edit this script to always return true and set the % to 100, the group will never spawn. Either the manual is grossly misleading, or this is broken. Here's the test mission: groupCONDITION.miz It SHOULD just spawn a helo group if the CONDITION returns true (it's an RNG from 0 to 10, anything over 5 is a TRUE - check the DCS.log to see if the script is called and what the return value is) but either way, the game NEVER spawns the group.
TEMPEST.114 Posted June 5, 2024 Author Posted June 5, 2024 (edited) @Flappie Hiya. Any chance you can let me know if/when you've spoken to the devs to confirm that this is indeed a bug or am I missing something that (yet again) isn't clear in the Manual or UI? Edited June 5, 2024 by TEMPEST.114
Flappie Posted June 20, 2024 Posted June 20, 2024 Hey @TEMPEST.114. Apparently, it's been broken for a very long time: I can't seem to make the CODE field work either, but I'm not a programmer. Can you please test it before I report the whole CONDITION+INIT script mess? 1 ---
Grimes Posted June 20, 2024 Posted June 20, 2024 It needs a return statement in the condition box. Same goes for the condition in the start and stop conditions for tasks. nullAdd that and it'll work as expected. 1 2 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Recommended Posts