Squiggs Posted May 10, 2024 Posted May 10, 2024 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 Grimes Posted May 10, 2024 Solution Posted May 10, 2024 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 Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Squiggs Posted May 10, 2024 Author Posted May 10, 2024 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?
Grimes Posted May 10, 2024 Posted May 10, 2024 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 Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
funkyfranky Posted May 10, 2024 Posted May 10, 2024 Here are a few short demos showing how you track the weapon and interact with it (e.g. destroy it) https://github.com/FlightControl-Master/MOOSE_Demos/tree/master/Wrapper/Weapon A warrior's mission is to foster the success of others. i9-12900K | RTX 4090 | 128 GB Ram 3200 MHz DDR-4 | Quest 3 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
Squiggs Posted May 10, 2024 Author Posted May 10, 2024 15 minutes ago, funkyfranky said: Here are a few short demos showing how you track the weapon and interact with it (e.g. destroy it) https://github.com/FlightControl-Master/MOOSE_Demos/tree/master/Wrapper/Weapon Those are really good. Simple scripts and shows how to lay it out. Thanks.
Recommended Posts