Raised This Month: $ Target: $400
 0% 

Chargeable Fire


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 09-10-2012 , 10:59   Chargeable Fire
Reply With Quote #1

I am making a weapon which can fire nades.
I want to make it while holding the primary attack button, the weapon charges in order for the nade to gain more velocity, like the sticky gun in TF2.
SpeeDeeR is offline
matsi
Thinkosaur
Join Date: Sep 2006
Old 09-10-2012 , 11:23   Re: Chargeable Fire
Reply With Quote #2

And what is your question?
__________________

Accepting all kinds of requests via private message.
matsi is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 09-10-2012 , 18:53   Re: Chargeable Fire
Reply With Quote #3

How can I make that chargeable fire.
SpeeDeeR is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-10-2012 , 19:08   Re: Chargeable Fire
Reply With Quote #4

hook FM_cmdstart and FM_cmdend, check if primary attack command is started and create task to increace a global variable until the FM_cmdend is triggered, create the nade in FM_cmdend forward and calculate its velocity some way using the global variable you increaced with task
jimaway is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 09-11-2012 , 07:40   Re: Chargeable Fire
Reply With Quote #5

Quote:
Originally Posted by jimaway View Post
hook FM_cmdstart and FM_cmdend, check if primary attack command is started and create task to increace a global variable until the FM_cmdend is triggered, create the nade in FM_cmdend forward and calculate its velocity some way using the global variable you increaced with task
How can I get the entity index of the weapon the player is holding while pressing the fire in order to block its action.
SpeeDeeR is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-11-2012 , 07:51   Re: Chargeable Fire
Reply With Quote #6

Code:
if (get_user_weapon(id) == CSW_THATWEAPON)     new wid = find_ent_by_owner(-1, "weapon_thatweapon", id)

Last edited by jimaway; 09-11-2012 at 07:51.
jimaway is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode