Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Dead bodies

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
redrum Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York |

Posted: Sat Oct 20, 2007 10:23 pm Post subject: Dead bodies |

Where is the code that tells how long the dead bodies stay in the game. I looked in player and client.qc but can't find it? _________________ Welcome to the Overlook Hotel 69.113.123.178:27500

Back to top |

Orion Joined: 12 Jan 2007 Posts: 414 Location: Brazil |

Posted: Sat Oct 20, 2007 10:28 pm Post subject: |

There's no time the dead bodies stay in the game. When a player dies, he copies his frame and model to a global entity called "bodyque_head". When has more than 4 dead bodies in the server, the oldest body is removed from the queue. The function is in world.qc, called CopyToBodyQue().
_________________
There's no signature here. Stop looking for one.

Back to top |

Sajt Joined: 16 Oct 2004 Posts: 1026 |

Posted: Sat Oct 20, 2007 10:49 pm Post subject: |

If you want to easily increase the size of the bodyque... Pimp! It's a tutorial I wrote in 2004, so it's probably rotted since then and probably doesn't compile. _________________ F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.

Back to top |

redrum Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York |

Posted: Sun Oct 21, 2007 5:51 am Post subject: |

Thanks Sajt! Works great. I reduced the number to one. Less is more Now, I have dogs in my mod. How can I change them? _________________ Welcome to the Overlook Hotel 69.113.123.178:27500

Back to top |

redrum Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York |

Posted: Tue Oct 23, 2007 4:30 pm Post subject: |

Bueller? Bueller? _________________ Welcome to the Overlook Hotel 69.113.123.178:27500

Back to top |

Sajt Joined: 16 Oct 2004 Posts: 1026 |

Posted: Tue Oct 23, 2007 5:12 pm Post subject: |

If dogs are normal monsters then the corpses are permanent. It shouldn't be hard to remove them after a certain time. I dunno if this works, but give it a try: go to the last death frame in each of his death animations, and do something like this

Code:
void() corpse = { self.think = SUB_Remove; self.nextthink = time + 10; };
...
void() dog_die9 = [$death9, corpse] {};
...
void() dog_dieb9 = [$deathb9, corpse] {};

Hmm let's explain. If you don't know how these shortcut 'animation' functions work...
This:
void() dog_die1 = [$death1, dog_die2] {/*code*/};
Is short form (I think!) for this:
void() dog_die1 =
{
self.frame = $death1;
self.think = dog_die2;
self.nextthink = time + 0.1;
/* code */
};
With the added bonus that you don't have to prototype dog_die2 before you use it...
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.

Back to top |

redrum Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York |

Posted: Tue Oct 23, 2007 8:01 pm Post subject: |

I'll try it out! _________________ Welcome to the Overlook Hotel 69.113.123.178:27500

Back to top |

Orion Joined: 12 Jan 2007 Posts: 414 Location: Brazil |

Posted: Wed Oct 24, 2007 2:12 am Post subject: |

[drunk mode] You can use CpoyotBofyReu() too, at ehe very als dog's daetyh farme, bt jsut fcalling it adn cahngin cpoepse to dog-Die9 adn dog-dieb9. But if you prefer a limitre dtime to a body be romed, vuse the code Saht gav tou. EDIT: Call a Remove(Serlf); at dog_gdie9 and sog_Dieb9 to ir bw propelr rmobgved.
[/drunk mode]
SAP
SAP EDIT: Call a remove(self); at dog_die9() and dog_bdie9() to it be properly removed.
_________________
There's no signature here. Stop looking for one.

Back to top |

redrum Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York |

Posted: Wed Oct 24, 2007 2:28 pm Post subject: |

WTF! LOL _________________ Welcome to the Overlook Hotel 69.113.123.178:27500

Back to top |

redrum Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York |

Posted: Wed Oct 24, 2007 8:40 pm Post subject: |

When the dogs die, they don't drop to the floor. They remain in their last position for 10 seconds then disappear? I tried all sorts of different ways with the code but always end up in the same situation.

Code:
void() dog_die1 = [$death1, dog_die2] { self.nextthink = time + 10; self.think = SUB_Remove; };
void() dog_die2 = [$death2, dog_die3]
{
self.nextthink = time + 10;
self.think = SUB_Remove;
};
void() dog_die3 = [$death3, dog_die4]
{
self.nextthink = time + 10;
self.think = SUB_Remove;
};
etc...........

_________________
Welcome to the Overlook Hotel 69.113.123.178:27500

Back to top |

Orion Joined: 12 Jan 2007 Posts: 414 Location: Brazil |

Posted: Wed Oct 24, 2007 9:26 pm Post subject: |

These 2 lines you shouldn't add at every death frame, just in the last. Remove the lines from all of them unless of the last death frame. _________________ There's no signature here. Stop looking for one.

Back to top |

redrum Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York |

Posted: Thu Oct 25, 2007 2:19 am Post subject: |

Ok, thanks. Works great! _________________ Welcome to the Overlook Hotel 69.113.123.178:27500

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group