Jump to content

Recommended Posts

  • ED Team
Posted

Hi all

 

I have a blackhawk in a mission i am writing he lands to pick up some troops.

 

Is it possible to make it only take off again when a flag has been triggered in conditions?

 

and if so can you explain it to me :music_whistling:

 

thanks for looking, I appreciate it

smallCATPILOT.PNG.04bbece1b27ff1b2c193b174ec410fc0.PNG

Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status

Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, PIMAX Crystal

Posted

The stop condition should work. It appears the text description is cut off in 1.2.2, but its the "Is User (Flag)" condition. The number is the flag represented and the box to the right is whether that flag is true or false.

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

  • ED Team
Posted

Thanks

 

works as you suggested it would,

 

however I did initially make the mistake of trying assign a flag higher than 100 which will not work. The condition can only be set on a flag off 100 or less :)

smallCATPILOT.PNG.04bbece1b27ff1b2c193b174ec410fc0.PNG

Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status

Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, PIMAX Crystal

Posted

You can always use the Condition box below it and use lua code:

 

return trigger.misc.getUserFlag(flagnumber)

 

If the flag is true the condition will stop, if the flag is false it will keep going.

 

If you want the flag to be a certain value, you can do something like:

 

if trigger.misc.getUserFlag(flagnumber) == false then

return true

end

 

if trigger.misc.getUserFlag(flagnumber) == 25 then

return true

end

 

The last one *Might* not always work. Flags are kind of weird because in the game they can be either a true/false or hold a number value. So it might give you an error saying something like "cannot compare boolean to number."

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...