Home   Help Search Login Register  

Author Topic: Force AI unit to fire in Burst or Full automatic mode  (Read 1256 times)

0 Members and 1 Guest are viewing this topic.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
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:

Code: [Select]
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.

Code: [Select]
_soldier fire ["throw","SmokeShell","SmokeShell"]
The definition for the command is:

Code: [Select]
Unit fire ["muzzle", "mode", "magazine"]
Any ideas anybody?
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline Rommel92

  • Members
  • *
Re: Force AI unit to fire in Burst or Full automatic mode
« Reply #1 on: 04 Apr 2008, 06:42:26 »
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:
Code: [Select]
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?
« Last Edit: 04 Apr 2008, 06:55:20 by rommel92 »