Home   Help Search Login Register  

Author Topic: Stopping a unit firing  (Read 785 times)

0 Members and 1 Guest are viewing this topic.

Drozdov

  • Guest
Stopping a unit firing
« on: 30 Sep 2003, 12:56:23 »
How can you stop a unit while it's firing on something? I have a cutscene in which three GIM Tossers are told to chuck their rocks at a guy. I want them to stop once they've hit him or until about 10 seconds have elapsed. There doesn't seem to be any 'holdfire' command and 'setcombatmode blue' has no effect. How do I stop them targetting their target?

KyleSarnik

  • Guest
Re:Stopping a unit firing
« Reply #1 on: 30 Sep 2003, 13:06:57 »
Try setcaptive true if hes an enemy. Or removeallweapons on the GIM Tossers.  You could also try WPs.

Komuna

  • Guest
Re:Stopping a unit firing
« Reply #2 on: 30 Sep 2003, 16:17:37 »
Theorically, _Unit setCombatMode "BLUE" (ALLCAPS), should work.

There's also the removeMagazines command (_unit removeMagazines "Rocks") and the disableAI:

_Unit disableAI "TARGET"
_Unit disableAI "AUTO TARGET"


--- Edit ---

I've just noticed that you, Drozdov, have missed the quotes on the "BLUE" (String). It should solve your problem.
« Last Edit: 30 Sep 2003, 16:19:19 by Komuna »

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:Stopping a unit firing
« Reply #3 on: 30 Sep 2003, 18:22:31 »
SetCombatMode "BLUE" should work, but takes time before it kicks in.  CfgVehicles has an intriguing variable MinFireTime.  If this is the minimum period a unit will fire on its current target, (a reasonable guess?) the 20 seconds it's set to is a l-o-n-g time to be under fire.  The next command doesn't seem to  initiate until tht 20 seconds is up.  A target might survive rocks for that period, but not much else.

DisableAI might be a bit severe as it can't be re-enabled and removing weapons/mags seems clumsy, but probably OK for a cutscene.

SetCaptive true is perhaps the neatest solution if it has an instant effect - wish I'd thought of that one, want to get home and try it now . . .

Kaliyuga

  • Guest
Re:Stopping a unit firing
« Reply #4 on: 30 Sep 2003, 21:10:50 »
CfgVehicles has an intriguing variable MinFireTime.  If this is the minimum period a unit will fire on its current target, (a reasonable guess?)


Code: [Select]
minFireTime=20; // minimal time spent firing on single target

indeed it is ;)

Drozdov

  • Guest
Re:Stopping a unit firing
« Reply #5 on: 01 Oct 2003, 20:05:42 »
I didn't miss out the "" when I wrote it in my mission, just when I wrote the post. But the setCaptive true would work... don't know why I didn't think of that myself...