OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Hertog Jan on 14 Jun 2005, 12:51:19
-
Hello,
I wanted to know how to make the AI fire off their grenadelauncher just like some mission in Resistance (Don't know the name, but you have to secure a town with a tankplatoon, grenadelaunchers are set up in the forests)
I looked in the editors depot but I couldn't find anything, only how to plant satchels etc.
The command UNITNAME fire["fire","Grenadelauncher"] didn't work....
So the idea is to create some sort of small artillerybarrage from grenades
-
UNITNAME fire["fire","Grenadelauncher"]
If thats the code you used, then its wrong. It should be this
UNITNAME fire ["fire","Grenadelauncher"]
Always a space after "fire" ;)
Hauk
-
Wrong.
West units :
myunit Fire ["M203Muzzle","GrenadeLauncher", "GrenadeLauncher"]
East units :
myunit fire ["GrenadesMuzzle","GrenadeLauncher","GrenadeLauncher"]
Make a whole group of grenadiers fire their nades :
1- initialise your group
grengroup = group this
2- fire command for the group
EAST
{_x fire ["GrenadesMuzzle","GrenadeLauncher","GrenadeLauncher"]} foreach units grengroup
WEST
{_x fire Fire ["M203Muzzle","GrenadeLauncher", "GrenadeLauncher"]}foreach units grengroup
-
yep blancos right i used that code in a mission not long ago and worked great the only problem getting them the right distacne from the target wich is a pain in the arse
-
The unitcommand worked perfectly, but when I tried the group command I got the message unknown operator... and I copied the command from here...
Also I want to know if it's possible to make them fire at a specified target such as a car or something..
And should I replace m203muzzle with MM1muzzle if I want to use the MM1 GrenadeLauncher?
So it would look like this:
Myunit fire ["mm1Muzzle","MM1",MM1"]
-
The MM-1 doesn't have a 'muzzle'
It just has the classname "MM1" and magazine name is "MM1Magazine"
Planck