.qc (dot qc) - the group for quake c coders of all denominations. If you make quake one mods and write code in quake c, join our group! I'll try to answer any quake c questions - please post your inquiry in the forums...

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
Add media Report RSS Respawning stuff
Post comment Comments
numbersix Author
numbersix - - 2,244 comments

Respawning items is easy.

If you use existing touch functions or copy the code to your own - just set a couple things, clear the model and think to SUB_regen.
Mostly done.

But what if you want to respawn an explode box? A monster? Or literally anything?

That gets a little tricky. So I'm working on generic code to do this.

Why?

Exploding boxes / barrels that respawn in DM are fun.

But I messed this up.

Can anyone tell what went wrong?

I null the model and set the exploder (a Q2 barrel here) to non-solid.
A spawn_loop call makes an explosion.

That never ends...

So, I forgot to 0 .takedamage on the barrel.
The explosion sets off another explosion. Forever.

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: