Home   Help Search Login Register  

Author Topic: cannonfire and dofire  (Read 479 times)

0 Members and 1 Guest are viewing this topic.

kobay

  • Guest
cannonfire and dofire
« on: 10 Jan 2005, 11:41:19 »
hi GI

as I ask in a previous topic, i need to let a neberwefer fire to a hidden target.

Triggerhappy and many others helped me thanksfully with a script named cannonfire.sqs
I've tryed this....seems that work just for the part were the neberwefer pointing at target, then will not fire.
In case i try to change the name of weapon but still not work.

After that other GI tell me about a simple dofire command.
I try this in the init field eithe of the neberwefer and gunner:
neb dofire target01

Nothing works!!!!  :'(

THE QUESTION IS: HOW CAN I GET THE NEBERWEFER FIRE TO A IDDEN TARGET (H invisible)? I WOULD LIKE TO ACTIVATE THIS BY A TRIGGER

Next i'll copy the cannofire.sqs

THANKS EVERY  ;D

script 1
#loop
  mycannon dotarget mytarget
  ~1
  mycannon fire (weapons mycannon) select 0
  ?(mycannon ammo ((weapons mycannon) select 0)) > 0: goto "loop"

scipt2
#loop
  mycannon dowatch [getpos mytarget select 0,getpos mytarget select 1,100]
  ~1
  mycannon fire (weapons mycannon) select 0
  ?(mycannon ammo ((weapons mycannon) select 0)) > 0: goto "loop"
 

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:cannonfire and dofire
« Reply #1 on: 10 Jan 2005, 22:06:33 »
fire uses an array so here is the coorect line (you can find it in the scripts easy can't you?)

mycannon fire [(primaryweapon mycannon),"single"]

as you can see, i aslo changed the way you define the main gun (or only in your case ;D) to be used
hope that works

BTW, I don't remember helping with these scripts.... ???

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:cannonfire and dofire
« Reply #2 on: 11 Jan 2005, 04:12:38 »
It also might help if you make your hidden target an invisible targer instead of the invisible H.  The invisible target addons can be found at the Addons Depot.  The Invisible H is not regarded as an enemy, but if you choose the correct invisible target, then the unit will fire on it without any special coaxing.  Check out this topic thread where I give more info on the Invisible targets:

http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=21394;start=0;boardseen=1
« Last Edit: 11 Jan 2005, 04:14:00 by Raptorsaurus »

kobay

  • Guest
Re:cannonfire and dofire
« Reply #3 on: 11 Jan 2005, 15:53:29 »
Thanks GI
now i'll try and hope works

Thanks again

UAH!