Jump to content

Recommended Posts

Posted

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.

Posted (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 by TEMPEST.114
  • 3 weeks later...
Posted

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?

  • Thanks 1

---

Posted

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. 

image.png

  • Like 1
  • Thanks 2

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...