Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » hooking reload
Re: hooking reload [message #475257 is a reply to message #475252] Thu, 27 September 2012 04:34 Go to previous messageGo to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma:
General (5 Stars)
Whenever I have needed to do anything scripts related based on current weapon ammo I have just used a timer that fires off very rapidly (resetting it each time it fires) and used the scripts API to check the current bullet count. It's not the most efficient thing in the world but you can detect reloads by seeing when the bullet count increases from the previous check. If the weapon doesn't fire bullets more rapidly than your timer you can also determine if it was a manual reload (previous bullet count >1) or an automatic one.

http://steamsignature.com/card/1/76561197975867233.png
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Feel like making something
Next Topic: destroy all vehicles
Goto Forum:
  


Current Time: Wed Aug 07 12:40:04 MST 2024

Total time taken to generate the page: 0.00768 seconds