Jump to content

How does the editor deal with short life objects (missiles, bombs etc)


Go to solution Solved by Grimes,

Recommended Posts

Posted

I'm familiar with how the editor deals with units and groups, but I'm wondering how it deals with short instance things like missiles and bombs that appear once launched and then disappear once they explode? It has a method of detecting them with the "Bomb in zone" triggers, but is it possible to interact with these in any way (for example making a missile or bomb appear/disappear mid flight or something like that).

  • Solution
Posted

Scripting is the primary way of interacting with weapons. Most often via the shot event to get the weapon object, then its up to you to decide what you want to do with that object. A few training scripts check the distance of the missile to its target and then remove the missile by calling an Object.destroy on it. On the Grayflag servers I use land.getIP on information from weapons to determine where a bomb or missile precisely impacted a runway section. 

Unfortunately you can't create a weapon in air. The AI or a player has to launch the weapon from something. Then its up to whatever the guidance of that weapon to hit whatever it is targeting. 

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

Posted

Looks like I've got to go learn the scripting. I know I will have to learn lua but I have done scripting for other games and some programming so the transition shouldn't be too painful. Are there any examples/places I can find of short simple scripts to assist with learning how they are constructed?

Posted

There are some samples on the wiki, but they are typically pretty short and limited to the specific scope of that function. Can always search this forum, there are plenty of questions that have been asked and answered here. Or make a new thread asking specifics. 

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