Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
SD_BOB

AI Throw Smoke - Broken

Recommended Posts

Hey guys, after searching around and looking at the wiki it seems that the correct code to make an AI throw a smoke grenade should be the following:-

unitname fire ["SmokeShellMuzzle","SmokeShellMuzzle","SmokeShellGreen"]

I cannot get this to work, either via trigger or waypoint activation.

Setup:

Pilot named downedpilot with Init:

removeAllWeapons this; this addMagazine "SmokeShellRed";

2 waypoints set, 2nd waypoint has the follwing in the On Act:

downedpilot addMagazine "SmokeShellRed"; downedpilot fire ["SmokeShellMuzzle","SmokeShellMuzzle","SmokeShellRed"];

Has anyone got any ideas?

Thanks

Edited by Shadow.D. ^BOB^

Share this post


Link to post
Share on other sites

For me works fine this:

this fire "SmokeShellMuzzle";

so try:

removeAllWeapons pilot; pilot addMagazine "SmokeShellRed";pilot fire "SmokeShellMuzzle";

Pilot should throw red smoke grenade (tested with trigger).

EDIT: BTW recently tested other commands, that should make soldier fire his weapon - doFire and action "USEWEAPON" both of them seems to be broken, unless I do something wrong each time. Only "fire" works, but soldier is firing in strange way - only into the sky, good for grenades perhaps, not good for other weaponry...

Edited by Rydygier

Share this post


Link to post
Share on other sites

Cheers mate, seems to work fine now, appreciate the help.

| | PROBLEM SOLVED | |

Share this post


Link to post
Share on other sites
Sign in to follow this  

×