Men of War: Assault Squad 2

Men of War: Assault Squad 2

Gem Editor Help - Action Command
I'm currently trying to have my AI controlled units perform specific actions for my scenario when they're within a certain area. For this particular case, I'm trying to get a Unit to use their smoke grenade and throw it at a specific waypoint.

I've made a script where it checks if a Unit is in a particular zone, AND has a smoke grenade in their inventory, which then gives them a specific tag like "Smoke Unit". However, I'm unable to have them perform the specific action (in this case throw smoke), even though I've used the "Action" trigger with the "Smoke Unit" tag, and specified to "Throw sk grenade" at waypoint 1. Currently I've only scripted a simple "Go to Waypoint 0" followed by a "delay", and then the "Action" command to throw the smoke at Waypoint 1, but the unit just stands there after reaching waypoint 0. (Waypoint 0 and 1 are not linked).

I'm probably doing a step or two wrong, and would appreciate any help. Thanks in advance!
Originally posted by Tjdagger:
Hi mate,
I never could get the grenade throw actions to work as expected. However I have a solution.
First add a "Inventory" command, found under "entity".

Use the "take" action and select the grenade as the "item".
This will force your guy to equip the grenade.

Next Add delay of 0.5

Then add an "action" command.
For action use "attack_ground" and specify the "waypoint".

He will throw the grenade at the waypoint and then switch back to his primary weapon and start shooting at the waypoint.
You may need to add a delay after the "action" command and give him addition commands if you don't want him to stand there shooting at the waypoint.

Good luck & Cheers mate.
< >
Showing 1-3 of 3 comments
The author of this thread has indicated that this post answers the original topic.
Tjdagger May 26, 2021 @ 3:46pm 
Hi mate,
I never could get the grenade throw actions to work as expected. However I have a solution.
First add a "Inventory" command, found under "entity".

Use the "take" action and select the grenade as the "item".
This will force your guy to equip the grenade.

Next Add delay of 0.5

Then add an "action" command.
For action use "attack_ground" and specify the "waypoint".

He will throw the grenade at the waypoint and then switch back to his primary weapon and start shooting at the waypoint.
You may need to add a delay after the "action" command and give him addition commands if you don't want him to stand there shooting at the waypoint.

Good luck & Cheers mate.
Top notch explanation, mate! Works exactly as I need it to, thank you, very much!
Tjdagger May 27, 2021 @ 6:40pm 
Originally posted by Jr3 | Phillip McKraken:
Top notch explanation, mate! Works exactly as I need it to, thank you, very much!
Good to hear, happy I could help mate.
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: May 26, 2021 @ 2:22pm
Posts: 3