Not a member yet? Why not Sign up today
Create an account  

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to use FireWeapon?

If I have one missile on hull and call FireWeapon (0,1),  then notheng happens. Help says I need to aim first. 
I find AimWeaponInDirection function, but i dont know what to sentd in x,y,z. I try to use Weaponinfo.CurrentDirection vector for that. It doesn't works. what should I do to fire?


Wid    =0
Wtype  =0
Wready =0

function Update(I)
  Wid   =I:GetWeaponCount()-1
  Winfo =I:GetWeaponInfo(Wid)
  V1    =Winfo.CurrentDirection
  Wtype =Winfo.WeaponType

  Wready=I:AimWeaponInDirection(Wid, V1.x,V1.y,V1.z, 1)
  I:FireWeapon(Wid, 1)
  I:LogToHud("Wid:"..Wid.." Wready:"..Wready.." Wtype:"..Wtype.." CHECK hjffkf")  

Messages In This Thread
how to use FireWeapon? - by dsadsa87 - 2019-10-03, 11:39 AM

Forum Jump:

Users browsing this thread:
1 Guest(s)