Jump to content

Do I need to use a custom script?


Recommended Posts

I'm not the best with programming.  I know enough to get what I want done...   in an entirely different game in a different scripting language.   And I do well enough with Javascript/PHP to, again, make pages that are useful to me.


That said, before I run off to try and learn LUA, I'd like to know if something that I am attempting to do in the editor is possible without a custom script.


I have a series of missions I want to make that I can load up to practice landing and navigation, and when reading a tutorial on the mission editor, I got the idea to use zones at the end of the runway, and one to the side at Kutaisi where, if you land right, etc. you can turn early.

Is it possible within the confines of the trigger system to set things up such that when my plane enters either of the zones, that it checks for whether or not the plane took damage during landing, and flags the mission fail or success based on the condition of my plane?


Also, while I'm on the topic: In the conditions window, you have the option of FLAG IS TRUE/FALSE, but in the actions window you have FLAG ON/OFF.

If you set a flag to TRUE, does it carry a value of 1, which can then be incremented up or down in the action window? 

If you turn a flag OFF, does it make the flags current value immutable, or does it reset it completely?

Link to comment
Share on other sites

Yeah I don't know why its named Flag on/off when its setting the value to 1 (true) or 0 (false).

Flag increase, decrease, and set random value all just change the flags value to however it was changed. 


There isn't actually a whole lot of capability to detect specific damage* that can occur to a unit. The most you can do via strictly using simply triggers is checking if unit is damaged is true. But that requires it to not be damaged before landing because it gives no information at all for how damaged it is. Using the scripting engine you can use Unit.getLife() and see if the value changes from whenever it was airborne to whenever it landed. But its just a number value that gives no specifics and to be honest I haven't tested it a ton with crash landings to know if  there is an appreciable change. 


* There are the triggers for X: Cockpit someCondition which are mainly used for training missions and the like. It would have to be a single player only mission because these only work in single player and on the "Player" aircraft. However the correct values for these are not at all obvious and difficult to figure out. 

  • Like 1

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites


  • Recently Browsing   0 members

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