Hi all. I have been having trouble with the "fire" command (yes I have used the "wonderful" search function).
I am using one of E&S's Marines with the M249, I am at work now and cannot remember the gun and mag names, but I assure you it is correct. I will call it M249 for now.
I am trying to simulate a shooting range, with the marines shooting at targets.
I have this in the unit's init line: this setunitpos "down", [this,target01] exec "forcefire.sqs", and he is meant to be firing at the "Target E" objected named "target01".
This invokes a script that works along the lines of this:
_unit = _this select 0
_target = _this select 1
_count = 0
~4
_unit dowatch _target
#loop
? ( _count == 50 ) : exit
_unit fire "M249"
_count = _count + 1
goto "loop"
The object of this script is to make him fire some short bursts at the target, and it works fine apart from one annoying thing.
The soldier in question promptly hit's the dirt, then looks up straight in the air and proceeds to fire his rounds straight up.
Messing around with the target command and dowatch commands avail to nothing.
It is interesting to note that if you simply use the fire command in his init he lets off one round without this annoying behaviour.
The search function revealed someone else has had this problem too, but it remains an unsolved mystery.
Thanks
Dave