Jump to content

Triggers and zones in background? How it works?


RoGaR

Recommended Posts

Hi, I playing around with the mission editor for a while and I'm using often triggers, cockpit actions etc., but sometimes the trigger list start to be heavy (long) after a while, and even if I use colors to keep the list synoptic, it's a bit messy. I checked few downloaded missions / campaigns and in few of them I saw no triggers in the trigger list at all. There is not even a call for .lua script, any call for initialization or something. But when I play the mission there have to be there because some actions are definitely have to be triggered.

I like this approach, that after I finished with some triggers and zones move them externally to the script. At the moment I have no idea how to do that any advices or guidance? 


Edited by RoGaR
Link to comment
Share on other sites

Certainly other colleagues know more and I can only point you a general direction, but I don't want to keep you waiting.

My guess on the no script call examples is, that they maybe are done using ED's support or effectively encrypted.

If you need help making your first script, then I'd propose Moose framework, which enchances DCS API objects and has vast functionality. There are of course others, but I know this one somewhat well.

Starter's guide: https://flightcontrol-master.github.io/MOOSE_DOCS/

The issues and my experiences:
* I haven't got eclipse LDT to work, so I use notepad++ with syntax highlighting
* I use MESSAGE class to print debug information and main DCS log to check errors
* Script runs until a first error
* My only triggers are: load moose.lua script and then load my custom logic script
* The december 2021 release had moose_.lua (smaller size, no comments) file somewhat broken, so I use the full moose.lua
* I simulate triggers by running a SCHEDULER instance to check conditions (unit in zone in my case) every 1 second (the smallest interval allowed). You may need more scheduler tasks to keep logic tidy and clean as it may get complicated
* Moose possibly already have the functionality you need to make
* Documentation on github is newer than the release you got, but the bigger moose.lua incorporates good commentary and examples in the form of actual code
* You can use every single moose class separately to achieve more granularity

I can answer your question, if I get the notification.

Good luck

Wysłane z mojego MI MAX 3 przy użyciu Tapatalka

* moose detects on startup zones, triggers and some dcs objects for you to access in its database

Wysłane z mojego MI MAX 3 przy użyciu Tapatalka

  • Thanks 1
Link to comment
Share on other sites

On 1/10/2022 at 5:08 PM, LG-Skyman said:

Certainly other colleagues know more and I can only point you a general direction, but I don't want to keep you waiting.

My guess on the no script call examples is, that they maybe are done using ED's support or effectively encrypted.

If you need help making your first script, then I'd propose Moose framework, which enchances DCS API objects and has vast functionality. There are of course others, but I know this one somewhat well.

Starter's guide: https://flightcontrol-master.github.io/MOOSE_DOCS/

The issues and my experiences:
* I haven't got eclipse LDT to work, so I use notepad++ with syntax highlighting
* I use MESSAGE class to print debug information and main DCS log to check errors
* Script runs until a first error
* My only triggers are: load moose.lua script and then load my custom logic script
* The december 2021 release had moose_.lua (smaller size, no comments) file somewhat broken, so I use the full moose.lua
* I simulate triggers by running a SCHEDULER instance to check conditions (unit in zone in my case) every 1 second (the smallest interval allowed). You may need more scheduler tasks to keep logic tidy and clean as it may get complicated
* Moose possibly already have the functionality you need to make
* Documentation on github is newer than the release you got, but the bigger moose.lua incorporates good commentary and examples in the form of actual code
* You can use every single moose class separately to achieve more granularity

I can answer your question, if I get the notification.

Good luck

Wysłane z mojego MI MAX 3 przy użyciu Tapatalka
 

* moose detects on startup zones, triggers and some dcs objects for you to access in its database

Wysłane z mojego MI MAX 3 przy użyciu Tapatalka
 

So, the complete blank Triggers in ME is more or less a ED stuff (or some encryption). Thank you to saving me from hours of Googling.

I guess I will have to go for a "MOOSE" way, however the functionality in DCS if enough for my mission atm. and I feel learning "MOOSE" it's a bit overkill from the perspective what I want.

Thank you for your time to reply me. 

Cheers, RoGaR

Link to comment
Share on other sites

  • 3 weeks later...

I have programmed many MOOSE scripts for my missions. I think MOOSE, as it stands today, is a bit bloated. Plus the guy who wrote it is not around anymore.  An alternative is to just write the code for what you want. It's not all that hard. And it's good fun to learn LUA and make something work.

 

 

 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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