Jump to content

Recommended Posts

Posted

Hi! Maybe I am lazy for asking and should read up and find out for myself, but hopefully one of the lua gurus will be able to answer a couple of questions for me;

 

 

  • Can you with lua write your own trigger events through the mission editor?
  • Can you through lua obtain object reference/ pointer to triggering object of a trigger's event? (e.g. 'on take control' -> get triggering unit)
  • If at all possible to get object references, can you store them in variables? How would you create/ access these through the mission editor trigger system? (Just on theoretical level, not asking for step by step spoonfeeding or anything :) )

Posted
Hi! Maybe I am lazy for asking and should read up and find out for myself, but hopefully one of the lua gurus will be able to answer a couple of questions for me;

 

See links in my signature for most useful lua related stuff within the sim.

 

[*]Can you with lua write your own trigger events through the mission editor?

In a word yes. Basically any function can be called within a script at any point. You can make some pretty complex things happen with lua that you can't make happen using the mission editor alone.

[*]Can you through lua obtain object reference/ pointer to triggering object of a trigger's event? (e.g. 'on take control' -> get triggering unit)

All events are accessible within lua, however I haven't really messed with em much, so I can't give you specifics.

 

[*]If at all possible to get object references, can you store them in variables? How would you create/ access these through the mission editor trigger system? (Just on theoretical level, not asking for step by step spoonfeeding or anything :) )

 

Mist uses the "env.mission" environment to collect and reference every placed object within a mission and then creates a database of all of these objects sorted by different values. You can then sort through the databases to create custom tables. Ever wanted a "clients in zone" trigger? it can be done with lua easily.

The 1.2.3 patch added the "expression" trigger condition. This allows for a higher level of interconnection between mission editor triggers and the scripting engine.

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