Data Realms Fan Forums
http://45.55.195.193/

Grenades exploding and help with spawning actors with weapon
http://45.55.195.193/viewtopic.php?f=1&t=15296
Page 1 of 1

Author:  Eviltebor [ Wed Jun 10, 2009 8:35 pm ]
Post subject:  Grenades exploding and help with spawning actors with weapon

I have an npc that carries several grenades with gibimpulselimit 0.001 and i need this for the grenade to work. However when the actor dies all the grenades explode causing massive lag. Is there any way to auto remove the weapons when they die?

I also need the actor to spawn with 52 copies of the weapon.

Author:  mail2345 [ Wed Jun 10, 2009 8:38 pm ]
Post subject:  Re: Grenades exploding and help with spawning actors with weapon

Why?

Anyway, lua might help.

Have the grenades on destroy clean up the particles if there is no nearby actor.

Author:  CrazyMLC [ Wed Jun 10, 2009 8:42 pm ]
Post subject:  Re: Grenades exploding and help with spawning actors with weapon

If self.parent:IsDead() == true then
self.(disappear? I think GibThis would just make them explode anyway.)

Author:  mail2345 [ Wed Jun 10, 2009 8:50 pm ]
Post subject:  Re: Grenades exploding and help with spawning actors with weapon

self.Lifetime = 1

Though, since destroy happend it already detonated.

Due to the low gib impulse there is no time to update.

So, just
Code:
function Destroy(self)
if self.parent:IsDead() then
for p in MovableMan.Particles do
if p:IsInGroup("Invisible Nade Particles Group") then
p.Lifetime = 1
end
end
end
end

And have all the nade particles in invisible nade particle group.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/