Inside3D!
     

Wave-based game
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Preach



Joined: 25 Nov 2004
Posts: 122

PostPosted: Wed Aug 16, 2006 12:59 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
SkinnedAlive



Joined: 25 Feb 2005
Posts: 65

PostPosted: Wed Aug 16, 2006 9:54 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Wed Aug 16, 2006 8:39 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
SkinnedAlive



Joined: 25 Feb 2005
Posts: 65

PostPosted: Fri Aug 18, 2006 1:53 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Quake Matt



Joined: 05 Jun 2005
Posts: 129

PostPosted: Sun Aug 27, 2006 7:59 pm    Post subject: Reply with quote

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:
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.
Back to top
View user's profile Send private message
SkinnedAlive



Joined: 25 Feb 2005
Posts: 65

PostPosted: Tue Sep 05, 2006 11:48 am    Post subject: Reply with quote

Just so you know I have this solved and am soldiering on with the rest of the coding. Thanks for your help Matt.
Back to top
View user's profile Send private message
JasonX



Joined: 21 Apr 2009
Posts: 92

PostPosted: Mon Jan 18, 2010 11:34 pm    Post subject: Reply with quote

Have you ever finished this mod?
http://forums.inside3d.com/viewtopic.php?t=458

I'm interested in knowing how you made a wave-system in Quake!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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