PDA

View Full Version : fuse


Dr.G
04-30-2009, 08:41 PM
i just tested this:

////////////////////////////////////////////////////////////////////////////////////////////////////
// Gets or Sets the fuse on a grenade entity
// Only use the set param (value of 1 or 0) to set this offset; ignore it to "get"
// the current value
stock Float:dod_fuse( grenindex, Float:set = -1.0 )
{
new Float:gametime = get_gametime()
if( set > -1.0 ) set_pev( grenindex, pev_dmgtime, gametime + set )

new Float:current
pev( grenindex, pev_dmgtime, current )

return current - gametime
}

but it didnt do jack. how to control the fuse then?

Dr.G
06-17-2009, 11:13 AM
you can control the fuse if you force the nade to think right after you have set dmgtime....

like:


set_pev(grenade, pev_dmgtime, 2.0 /* float */)
dllfunc(DLLFunc_Think, grenade)

ghzero
09-26-2009, 07:06 AM
btw: is it possible to spawn a grenade on the map , set the fuse to 0.1 to force the direcly exploding ? :-)