Page 1 of 1

Fire?

PostPosted: Sat Nov 11, 06 3:51 pm
by Cozmo
Right, I wanted to make a gun that when fires it uses the owners bio instead of ammo. I was thinking of somthing like...

Code: Select all
Function Fire()
{
   if(DeusExPlayer(Owner).Energy >= 10)
   {
      DeusExPlayer(Owner).Energy -= 10;   
      Spawn(class'PlasmaBolt',Pawn(Owner),,Pawn(Owner).Location,Pawn(Owner).ViewRotation);
   }
else
   {
   DeusExPlayer(Owner).Clientmessage("|p2You don't have enough bio!");
   }
}


But I don't know how to let it know when fire has been called, I don't know the function name but I'm sure it's that. :?

PostPosted: Sat Nov 11, 06 4:32 pm
by Alex
Code: Select all
function Fire(float Value)
{
}

Placed in the weaponclass.

PostPosted: Sat Nov 11, 06 4:32 pm
by Cozmo
Ok, thanks Alex. :)

Edit: Hooray, 600 posts. 8) And the gun works as I wanted.