You're not going to get what you want by using npc_frag_grenade, I tried to 
spawn an npc_frag_grenade using an npc_template_maker and it did not work.  Let 
me explain what I went for and tell me if it's what you want...

I wanted to make a grenade drop from an opening in the roof to surprise the 
player, like the Combine are in the vents or something.  So I first tried 
making an npc_frag_grenade (which is the live grenade in-game when a character 
or player throws a grenade from their stock).  It didn't work.  So instead I 
did some sneaky mapping, try to pay attention...this is a lot of work for a 
grenade to drop out of the ceiling but it's cool so give it a chance.

I placed a weapon_frag (the one you pick up) way up in the vent, so that it 
will fall straight down into the hallway where the player is.  In the 
properties I set the spawnflag "Deny player pick-up", so that the player can't 
pick up the grenade for his stock.  Name your grenade something like "nade1".

I parented a few entities to the weapon_grenade that's up in the vent.  First, 
and env_explosion that's just outside the model of the grenade.  Set the 
grenade to deal out 125 damage., and make the parent be "nade1" or whatever 
your grenade is named.

I also parented a env_sprite to the weapon_grenade.  I made it strobing slowly, 
I made it small in size, and I made it red in color.  That way it looks like a 
normal, blinking grenade.

I also made an ambient_generic set to play the sound of a grenade chirp.  Not 
sure what the name is, you can search for it.

Finally, I made a point entity called point_template way up in the vent right 
next to the whole grenade setup.  If you haven't named your weapon_grenade, 
your env_explosion, or your env_sprite, name them all now.  Then add their 
names to the point_template list.  Whenever you trigger the point_template, the 
grenade, the explosion, the sprite, will all spawn in the vent and drop from 
the ceiling.  (Name your point_template)

Down where the player is walking, make a trigger_once.  This will contain all 
your I/O statements.  Here they are.  I'm using the name of the entity to 
describe the entities, you must use the names you give them.

OnTrigger > point_template > ForceSpawn > (none) > 0.0
OnTrigger > ambient_generic > PlaySound > (none) > 1.0
OnTrigger > ambient_generic > PlaySound > (none) > 2.0
OnTrigger > ambient_generic > PlaySound > (none) > 3.0
OnTrigger > ambient_generic > PlaySound > (none) > 4.0
OnTrigger > env_explosion > Explode > (none) > 5.0
OnTrigger > weapon_grenade > Kill > (none) > 5.1
OnTrigger > env_sprite > Kill > (none) > 5.1

Make sure you blow up the explosion before you "kill" the grenade.  Because 
when you "kill" an entity with the I/O system, everything parented to the 
entity also either dies, or fails to activate in the future.

Again, this is a long, long explanation of something that should have been 
simpler...but it requires no coding at all.  So pick your poison, good luck, 
and have fun.  And let us know if you have problems.

----- Original Message -----
From: gto5 <[email protected]>
Date: Saturday, August 29, 2009 3:50 pm
Subject: [hlmappers] frag
To: [email protected]

> found it but it doesnt respawn and doesnt cause damage ?? need 
> so help please thanks
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list 
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlmappers
> 
> 
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlmappers

Reply via email to