Re: Two very simple questions
Code:
if self.ToDelete then
...
end
Stick that to your Update(self) function
It will trigger if the bullet lodges into a wound, runs out of lifetime or settles into terrain, that is,
is set to delete.The bullets position will be at self.Pos
You could also use Destroy(self), but I have experiences suggesting that it's very crashy.
For the explosion,
make a MOSRotating with oldschool ini and then spawn and gib it with Lua.
You can spawn mulitple ones for more intense explosion.
Code:
particle = CreateMOSRotating("name")
particle.Pos = self.Pos
particle:GibThis()