Jump to content
Sign in to follow this  
Callaghan

Making AI use Satchel Charges

Recommended Posts

Ok, so I know this has come up before, but what should be working quite simply isn't. The idea is this, I have two Civillians, grouped to a non-existent OPFOR leader, they are meant to move to a waypoint and place a Stachel, run away and then detonate. The ONLY way I have managed to get this to work, is if I use addWeapon "pipebomb" as well as the addMagazine "pipebomb", but this is no solution, as it creates a scope error on the dedicated servers.

This is really getting to me, as it makes no sense whatsoever. The addMagazine command adds the Satchels, I have checked their gear to make sure. Even if I use the selectWeapon command before the Fire command they still refuse to plant them without using the game-killing addWeapon work around. It is as if they are unable to select the satchel charge to use it. Please help!

Thanks in advance.

Share this post


Link to post
Share on other sites

What happens when you do this?

unitname fire ["pipebombmuzzle", "pipebombmuzzle", "pipebomb"]

Also, addWeapon shouldn't be a problem in multiplayer. Make sure that the code is being executed on the server, not some client.

Share this post


Link to post
Share on other sites

It's a bit more complicated than just giving them satchel charges.

addWeapon "pipebomb" does not work, simply because there is no such weapon.

Give the unit a Pipebomb (or more) using the addMagazine command. Also give the unit a name, here we use "sapper1"

Next place a waypoint where he's placing the satchel and in the WP onActivation line type:

sapper1 fire ["pipebombmuzzle", "pipebombmuzzle", "pipebomb"]

Repeat this for the other places (if applicable).

If you want him to touch of the things, use:

sapper1 action ["TOUCHOFF", sapper1]

in either another WP or triggers onActivation line.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×