OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: johnnyboy on 19 Mar 2008, 17:06:32
-
Greetings!
Is there a way to script an AI unit to fire his weapon in Burst or Fully automatic mode?
The following code works to force a unit to fire, but he only fires single shots when I would like it to be burst or full auto:
rider1 action ["useWeapon",rider1,rider1,1];
The last parameter in the array is Weapon Position 1, which forces him to fire his primary weapon.
I see this command in the WIKI, and I'm hoping the mode parameter is what I want, but I don't know what values to use.
_soldier fire ["throw","SmokeShell","SmokeShell"]
The definition for the command is:
Unit fire ["muzzle", "mode", "magazine"]
Any ideas anybody?
-
Not so sure about that, perhaps search the forums or check more on the Biki about the class names.
In any cause why not just repeat "rider1 action ["useWeapon",rider1,rider1,1];" three times, ie:
rider1 action ["useWeapon",rider1,rider1,1];
rider1 action ["useWeapon",rider1,rider1,1];
rider1 action ["useWeapon",rider1,rider1,1];
Should that not do what you want?
EDIT: The mode would be "Burst", the Muzzle would be "Ak74" (I think, if it isnt, check this http://www.ofpec.com/forum/index.php?topic=31244.0) and the magazine could be (magazine _soldier)? Perhaps (PrimaryWeapon _soldier) could be the check for the weapon aswell.
What does this have to do with Multiplayer?