Jump to content

Recommended Posts

Posted

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.

Posted

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 -:pilotfly:

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)

Posted

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 -:pilotfly:

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)

Posted

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