.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...

Forum Thread
  Posts  
Think your problems away... (Groups : qc : Forum : vault() : Think your problems away...) Locked
Thread Options
numbersix
numbersix quake-c coder++
Nov 22 2013 Anchor

So, you have a quake mod and you just added some spiffy feature.

Gun shell casing eject for instance.

Great. Until you have 5000 of them littering the level and the server is coughing up its network intestines.

Now what?

You need a .think solution!

Full .think tutorial - Moddb.com
Like this:

entity e;
e = spawn();
// set model, size, origin, velocities, etc.

// entity remover found in subs.qc:
// void() SUB_Remove = {remove(self);};

e.think = SUB_Remove;
e.nextthink = time + 60 + random() * 60; // gone in 60 - 120 secs

Your casings, body parts and other decor will now remove themselves.

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.