Jump to content

Recommended Posts

Posted

Hi,

 

I am writing some scripts that need to control player's aircraft (not AI), like rudder or throttle. In essence, I would like to do in a Lua script the equivalent of "SET COMMAND" or "SET COMMAND WITH VALUE" that are available in trigger actions.

 

This seems simple enough but I cannot figure it out :-) I tried to search existing information but all I could find was references to export scripts (like for Tacview), but this is not what I need. I need this to be available in a script callable from mission editor, so it has access to all the mission state.

 

Thanks

 

Bolek

Posted

Thanks, but I already tried this and it seems that these generated scriptlets from the "mission" file are not run in the same enviroment as the user trigger actions. In fact the generated mission scripts call a_do_script() to run the user scripts for the trigger actions. This must modify the environment somehow.

 

In any case, I cannot find a_set_command_with_value() in any context available to trigger action scripts, as you have discovered too.

  • Recently Browsing   0 members

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