Forum

Wave-based game

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Postby Preach » Wed Aug 16, 2006 12:59 am

Are you doing anything dangerous like setting the origin without setorigin or changing the model without resetting the size? Ran into that problem today when doing a tutorial on teleporting monsters, they ended up much larger that they should have been otherwise.
Preach
 
Posts: 122
Joined: Thu Nov 25, 2004 7:20 pm

Postby SkinnedAlive » Wed Aug 16, 2006 9:54 am

Ah! That did it! The spawn function was setting the origin before it was setting the model. It's working just fine now. It's these little rules that always get me. Thanks for your help everybody!
SkinnedAlive
 
Posts: 65
Joined: Fri Feb 25, 2005 5:03 pm

Postby Sajt » Wed Aug 16, 2006 8:39 pm

Good one Preach! *shoots self in the face*
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.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby SkinnedAlive » Fri Aug 18, 2006 1:53 pm

Sorry to be a burden but I have another problem. I'm doing a findradius to check if it's all clear for spawning. Which works great except that it gets blocked up if a corpse gets in the way.

So how do I check that every entity in the chain is not a corpse (i.e. SOLID_NOT) with out checking every .chain individually?
SkinnedAlive
 
Posts: 65
Joined: Fri Feb 25, 2005 5:03 pm

Postby Quake Matt » Sun Aug 27, 2006 7:59 pm

I'm pretty sure you'll have to check for every entity in the chain. Even if it's possible to do it another way, the simplest way is usually the best! Considering a single spawn point, your code might look like this:

Code: Select all
head = findradius(org, 100);
while(head)
{
     if (head.solid != SOLID_NOT) //if head is a corpse
          //bad position - goto next spawn point
     head = head.chain;
}
//spawn player here


As an alternative to using findradius(), you could possibly do a droptofloor() check to see if the area is clear. Basically, if the entity cannot hit the floor (falls out of level, too high, stuff in way, etc) the function will return false and you'll know you can't spawn there. However, I haven't used it much myself, so I could be wrong about how it works.
User avatar
Quake Matt
 
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Postby SkinnedAlive » Tue Sep 05, 2006 11:48 am

Just so you know I have this solved and am soldiering on with the rest of the coding. Thanks for your help Matt.
SkinnedAlive
 
Posts: 65
Joined: Fri Feb 25, 2005 5:03 pm

Postby JasonX » Mon Jan 18, 2010 11:34 pm

Have you ever finished this mod?
viewtopic.php?t=458

I'm interested in knowing how you made a wave-system in Quake!
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Previous

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest