OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: UH60MG on 10 Jan 2009, 05:11:06
-
I'm making a cutscene where an AA soldier fires at a helicopter.
How do I get a unit to select his AA launcher and stay in that mode, not switching back to guns but also have him track a moving target?
-
You could try using selectWeapon to select the AA launcher, then disable anims with the
myUnit disableAI "ANIM"
Alternatively, you could try finding the animation to select an AA launcher, use playmove to get the unit into that animation state, and then disable their anims again.
-
Try this:
_soldier reveal _chopper
_soldier selectWeapon "Strela"
_soldier doTarget _chopper
_soldier doFire _chopper
of course replace _soldier and _chopper with the names you used for those units. Besides if your AA soldier has a Stinger, replace "Strela" with "Stinger".
The command reveal is used to make sure the unit knows the exact position of the chopper to target it.
-
That would also make the soldier fire the weapon, which I don't think was necessarily the goal of UH60MG. That might work though, if you remove the missile from their inventory, or something of the sort.
-
He said he was making a cutscene where an AA soldier fires at a chopper, so I thought he actually wanted to fire it. Well he just needs to setCombatMode to "blue" and not to use the doFire command.
-
Sorry, was basing my reply off of the second part of his post...
Will that work by just setting the combat mode to blue, just curious? I can't test it right now, but I do know that in game, if I command my AA people to hold fire (3-2) and they see a chopper, sometimes they will fire anyway. :P