grenades that explode on impact

  • Thread starter Thread starter rockmanexex
  • Start date Start date
R

rockmanexex

Guest
Im trying to modify a multiplayer grenade to explode on impact. Ive been able to get the nade to explode when it hits props but not the BSP World. Im using a touch function thats based off the grenade_ar touch function:

Assert( pOther );
if ( !pOther->IsSolid() )
return;

Detonate();

Can anyone help me with this? If I didnt give enough information let me know as I am new to this.
 
If no one can figure it out can someone point me towards a tutorial or information on how to create custom weapons from scratch for a mp game?
 
ey rockmanexex, if you find anything plz post...

-dodo
 
Ive managed to narrow it down to the create vphysics function in the gernade_frag.cpp, this seems to make it bounce off entities differently than BSP and there is an area in the function to define solid flags but I dont know what values equal which flag.
 
Hmnmmnmnm.

Would it not be a quicker/cleaner solution to create a new derived class from the AR-nade, change the model to the one you want, and then just change the references to normal grenades in the Grenade function to ones pointing at your new AR-esque grenade?

-Angry Lawyer
 
Hmnmmnmnm.

Would it not be a quicker/cleaner solution to create a new derived class from the AR-nade, change the model to the one you want, and then just change the references to normal grenades in the Grenade function to ones pointing at your new AR-esque grenade?

-Angry Lawyer

Ive tried to create the ar_grenade entity instead of the npc_grenade_frag but I cant get it move through the air. It just creates the nade and it falls to floor and explodes. I dont think thats what you meant though. Ill give it a try though.
 
Back
Top