Wave-based game
Moderator: InsideQC Admins
22 posts
• Page 2 of 2 • 1, 2
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
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
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?
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
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:
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.
- 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.
-

Quake Matt - Posts: 129
- Joined: Sun Jun 05, 2005 9:59 pm
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
Have you ever finished this mod?
viewtopic.php?t=458
I'm interested in knowing how you made a wave-system in Quake!
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
22 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest