OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: UH60MG on 10 Jan 2009, 05:11:06

Title: Help with cutscene
Post 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?
Title: Re: Help with cutscene
Post by: Tyger on 10 Jan 2009, 06:06:58
You could try using selectWeapon to select the AA launcher, then disable anims with the
Code: [Select]
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.
Title: Re: Help with cutscene
Post by: Ext3rmin4tor on 10 Jan 2009, 12:32:38
Try this:

Code: [Select]
_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.
Title: Re: Help with cutscene
Post by: Tyger on 10 Jan 2009, 18:30:36
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.
Title: Re: Help with cutscene
Post by: Ext3rmin4tor on 11 Jan 2009, 18:08:38
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.
Title: Re: Help with cutscene
Post by: Tyger on 11 Jan 2009, 20:02:43
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