Raised This Month: $51 Target: $400
 12% 

Calling grenade explosion


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 09-30-2011 , 13:55   Calling grenade explosion
Reply With Quote #1

So the actually the question is - how to call HE grenade explosion.I mean explosion sprites etc.I thought there is an event which creates an explosion, but I wasn't able to catch it.

Obviously it can be done through using orpheu and calling this:

Code:
CGrenade::ShootTimed2( m_pPlayer->pev, vecSrc, vecThrow, 1.5, m_pPlayer->m_iTeam, m_usExplo );


Although I am not sure will this work .
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-30-2011 , 14:21   Re: Calling grenade explosion
Reply With Quote #2

This function sets up the grenade and it will explode after 1,5 seconds. But if for just the explosion, you may not needed to setup like a real grenade. I mean setting offset, some pev, model and such may be fairly pointless, therefore the method below would be more appropriate.

Without using Orpheu, you can simply create a "grenade" entity at a specific origin, set pev_dmg with a value > 40 (otherwise you will get a flashbang explosion) and forcing it to think, then it should explode right away. (EDIT: not sure it will work actually, if you don't mind using orpheu, use it)
__________________

Last edited by Arkshine; 09-30-2011 at 14:39.
Arkshine is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 09-30-2011 , 14:45   Re: Calling grenade explosion
Reply With Quote #3

Damn it, obviously I explained it wrong.

Anyway, I have created a grenade launcher, and whenever grenade projectile launched by it touches something it should explode.All I need is explosion sprite(radius damage is needed too, since my radius damage stocks sucks!).

I tried your method and it doesn't work
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-30-2011 , 14:48   Re: Calling grenade explosion
Reply With Quote #4

So you should call directly CGrenade::Detonate3()
__________________
Arkshine is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 09-30-2011 , 15:14   Re: Calling grenade explosion
Reply With Quote #5

It works, thanks for helping.

If what this post helped me a lot^^
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-30-2011 , 15:51   Re: Calling grenade explosion
Reply With Quote #6

lol, did not remember that at all.
__________________
Arkshine 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 04:10.


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