EasyEB Posted February 23, 2017 Posted February 23, 2017 Greetings! I can't for the life of me get engageGroup to work, could someone please post an example code? Say group Blue1 is to engage group Red1.
shagrat Posted February 23, 2017 Posted February 23, 2017 Advanced WP Tasks, of the group Blue1. Add engage group, choose Red1 in the left box with the task details. Take care the groups are close enough to each other, or drive towards each other and actually have a line if sight. You can only attack what you see... Verify, you have no settings in advance WP action s like "ALARM state Green", ROE to hold fire etc. Shagrat - Flying Sims since 1984 - Win 11 | Ryzen 9 7900X3D | 64GB | GeForce RTX 4090 - Asus VG34VQL1B | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)
EasyEB Posted February 23, 2017 Author Posted February 23, 2017 Shit, I'm sorry, I meant in script. Thanks for taking the time though!
shagrat Posted February 23, 2017 Posted February 23, 2017 Ah, ok. If I remember correct, the groups (objects in general) are identified by a unique object ID#, not the readable name in the script engine. There is a '?' symbol behind the Group name, click on it. It shows the object/group ID. Careful, if you delete a group and create a new one, even with the exact same settings and name, you need to adjust the ID in the script! That is why MIST and MOOSE have functions to "find Group by name" and return the ID. Shagrat - Flying Sims since 1984 - Win 11 | Ryzen 9 7900X3D | 64GB | GeForce RTX 4090 - Asus VG34VQL1B | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)
Grimes Posted February 24, 2017 Posted February 24, 2017 Should be something like this: local task = {id = "EngageGroup", params = {id = Group.getByName('Red1'):getID()}} Group.getByName('Blue1'):getController():pushTask(task) 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
EasyEB Posted February 24, 2017 Author Posted February 24, 2017 I'll give it a shot, thanks! Hopefully Blue1 will too. I'll show myself out.
Recommended Posts