Tutorbot Chasing Enemies

Discuss programming in the QuakeC language.
Post Reply
drm_wayne
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Tutorbot Chasing Enemies

Post by drm_wayne »

Hey,

https://www.quaddicted.com/webarchive/m ... hasing.htm

I added this some months ago to my bots, but now i just realized theres something wrong with them:
Sometimes you and your bots are just getting stuck in the ground... Nobody can move anymore...

Anybody has an idea whats wrong? I think the line "setorigin(self.enemy.tracker, self.enemy.origin);"
is causing that error, so why is that used here?
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: Tutorbot Chasing Enemies

Post by frag.machine »

Try adding '0 0 1' to self.enemy.origin...
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
drm_wayne
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: Tutorbot Chasing Enemies

Post by drm_wayne »

frag.machine wrote:Try adding '0 0 1' to self.enemy.origin...
ahh thanks, it seems to work now:

Code: Select all

setorigin(self.enemy.tracker, self.enemy.origin + '0 0 10');
In Darkplaces the bug never happened, but in FTEQW, Fitzquake and DQuake.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: Tutorbot Chasing Enemies

Post by Spike »

are you sure that self.enemy.tracker is not world, and that you're not moving the entire world around? (the world cannot visibly move, but its origin does affect traces against it on the server).
I can't think of any other reason why the *player* would also get stuck because of some bot code.
drm_wayne
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: Tutorbot Chasing Enemies

Post by drm_wayne »

Its very strange...

The bug is still present.

EDIT: ok, i totally forgot that im not having teleporters in my qc yet, so i removed the teleporting releated stuff..
It seems to work now xD :)
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Tutorbot Chasing Enemies

Post by r00k »

This happened to me on my mod though with players, not taking damage before the round started but when they initially spawned.
I just put a quick loop in the spawn code something like

Code: Select all

		setorigin (self, spot.origin + '0 0 10');

		while (pointcontents(self.origin) == CONTENT_SOLID)//R00k: Fixes spawning in the map, caused by pre-game telefrag	[v1.62]
		{
			self.origin = self.origin + '0 0 2';
(corrected.)
Last edited by r00k on Fri Nov 15, 2013 5:37 pm, edited 1 time in total.
Cobalt
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA
Contact:

Re: Tutorbot Chasing Enemies

Post by Cobalt »

Stuck in the ground happens when the player model collides with another object who's size is not set correctly. I believe the engine will set the player size to
0 0 0, 0 0 0 (point size) when that happens, which gives the appearance of it being waist high in the floor. The only 3 valid sizes are point size, player size and shambler size....all other sizes will make things drop through the floor etc.
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Re: Tutorbot Chasing Enemies

Post by scar3crow »

Whenever something is happening in other engines, but not DarkPlaces, it wouldn't hurt to reach out to LordHavoc about it. He has implemented a number of "catch-all" portions to the engine where it corrects for common mistakes, this can quickly reveal to you what is happening.
...and all around me was the chaos of battle and the reek of running blood.... and for the first time in my life I knew true happiness.
Post Reply