Jump to content

Recommended Posts

Posted

This seems silly to me, so I assume I must have overlooked this somehow.

 

I'm writing a mission that I want to end immediately if something egregious happens (e.g. someone shooting down a civilian plane).

 

Now, I can do this quite easily outside of a Lua script by setting up a trigger, and invoking the End Mission action from ME - a kludge.

 

And... from inside my Lua code? Is there a trigger.misc.endMission() command somewhere that I overlooked? It seems quite inelegant to  setUserFlag() and then end the mission outside of my script via an ME action on that trigger.  

 

What am I overlooking?

 

Thanks,

-ch

Posted

There is in the server API but not in the mission scripting environment. Setting a flag and using the trigger is the only workaround. Or setting a trigger with a lua predicate to look for some global value and returning true to execute the trigger. 

 

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