Home   Help Search Login Register  

Author Topic: How to make unit shoot in a script?  (Read 685 times)

0 Members and 2 Guests are viewing this topic.

Pikkuveli_Suomi

  • Guest
How to make unit shoot in a script?
« on: 05 Dec 2003, 14:11:55 »
Okay. How I can get unit shoot in a script?
Can I do it by dofire command or is there another way?
And if I can then How?

Sorry about my bad english.  :-[

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:How to make unit shoot in a script?
« Reply #1 on: 05 Dec 2003, 14:29:11 »
Use doTarget and doFire commands.     Alternatively, use the command fire.   Look in the command refs for details.
Plenty of reviewed ArmA missions for you to play

O Neil

  • Guest
Re:How to make unit shoot in a script?
« Reply #2 on: 06 Dec 2003, 02:58:17 »
Hey

Is there a way in a script to make a unit JUST FIRE ? I don't want him to shot anybody, just ignor everyone & just shoot & shoot & shoot.

Can be done ?

O'Neil

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:How to make unit shoot in a script?
« Reply #3 on: 06 Dec 2003, 11:41:37 »
If you give him repeated fire commands he'll fire into the air repeatedly.     But to fire in a specific direction you'll need to give him a target.   I believe there is an invisible target addon somewhere, that might help.
Plenty of reviewed ArmA missions for you to play

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:How to make unit shoot in a script?
« Reply #4 on: 06 Dec 2003, 11:53:41 »
Using dowatch and fire commands you can have a unit to shoot in some general direction. Of course there has to be some object the unit will dowatch but it can be anything.  :)
Not all is lost.

O Neil

  • Guest
Re:How to make unit shoot in a script?
« Reply #5 on: 07 Dec 2003, 20:20:11 »
Hey

THat sucks, anyways, how bout this then.

1- How would you make the invis units (I've got em) invinsible? I know there's a lotta scripts on this, but none of em make em INVINCIBLE. The command for this, that realy long one, for me SOMETIMES works, don't ask I dunno why.

2- If you could make him invinsible . . . actually, there's no point in my question No.2 ;)

O'Neil

Harkonin

  • Guest
Re:How to make unit shoot in a script?
« Reply #6 on: 08 Dec 2003, 06:38:50 »
You could also use -

unitname action ["Fire","weaponname"]


or in a script-
;example call with [unitname,"weaponname"] Exec "Fire.sqs"

_unit = _this select 0
_weapon = _this select 1

_i = 0
_maxcount = howmanytimestoloop

#loop
_i = _i + 1
~(put a delay in here)
_unit action ["Fire",_weapon]

?(count magazines _unit > 0) && (_i < _maxcount):goto"loop"
?(count magazines _unit <= 0) || !(alive _unit):EXIT


syntax for count mags might be a little off don't have time to check comref but you get the idea.
 
« Last Edit: 08 Dec 2003, 06:40:23 by Harkonin »

O Neil

  • Guest
Re:How to make unit shoot in a script?
« Reply #7 on: 08 Dec 2003, 07:56:30 »
Hey

Not a heavy scipter but I'll try it, thxs.

(O'Neil