Ok, this is how I traditionally get AI to fire a Flare when an enemy patrol appoaches. I traditionally put these guys out as early warning when setting up an ambush.
Create an AI soldier. Give him a name (DUDE). In the initialization field, type: removeallweapons this; this addmagazine "ak47"; addmagazine "ak47"; addmagazine "ak47"; addmagazine "FlareRed"; addmagazine "FlareRed"; addmagazine "FlareRed"; this addweapon "AK47GrenadeLauncher";
Create a waypoint right in front of him. Combat mode: never fire, Behavior: stealth, all else no change.
Create a Trigger activated by the bad guys (in this case, west). In the On Activation field, type: DUDE fire ["GrenadesMuzzle", "FlareRed"];
Wollah, a red flare flies when bad guys run through your trigger.
Here's the problem. I want my DUDE to fire the flare in a certain direction. I've tried DUDE SetDir 045; DUDE fire ["GrenadesMuzzle", "FlareRed"];. That doesn't work.
The lines won't work at all if I put them in the On Activation field of a waypoint. He'll only fire the flare if the script is in a trigger. What i'd like him to do is run forward a short distance, fire, then continue on with his waypoints (i.e. run back to his car and haul a$$ out of there).
Any solutions?
-Air