Fire?

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Fire?

Postby Cozmo » Sat Nov 11, 06 3:51 pm

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. :?
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Alex » Sat Nov 11, 06 4:32 pm

Code: Select all
function Fire(float Value)
{
}

Placed in the weaponclass.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Cozmo » Sat Nov 11, 06 4:32 pm

Ok, thanks Alex. :)

Edit: Hooray, 600 posts. 8) And the gun works as I wanted.
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 2 guests