Urban Wars
April 20, 2024, 12:22:54 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome, here you will find all the information on Urban Wars
 
  Home Help Search Staff List Login Register  

weapon firing pause?

Pages: [1]
  Print  
Author Topic: weapon firing pause?  (Read 223 times)
DukeInstinct
Administrator
Lieutenant
*****
Posts: 120


The ArchDuke


View Profile WWW
« on: April 30, 2010, 10:59:01 am »

I just recently added a burst fire mode to Urban War's M4 carbine.

You need to recycle one of the field floats from your player entity that isn't being used. In your firing function check if that float is less than 1. If it is then set it to 3. If it is already more than 1 then decrease it by 1. If it is now equal to 0 after you decrease by 1 then set self.attack_finished to time+2.
« Last Edit: April 30, 2010, 11:07:43 am by DukeInstinct » Report Spam   Logged



Urban Wars Coder/3d Modeler/Animator



Pages: [1]
  Print  
 
Jump to:  


Get your own Chat Box! Go Large!
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy