[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Problem with .GroundEntity

Problem with .GroundEntity

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Problem with .GroundEntity

Postby Mr Lenguini » Sat Sep 10, 2005 4:54 pm

I've created a Lost Soul style enemy that flies around and shoots toward the player and causes touch damage when it hits him. The code works well except when the enemy hits the player from above the hitbox. When it does that, it gives the enemy a .groundentity field at which point it quits taking .velocity inputs and will no longer move. I can still set the enemies location by setorigin() but it will no longer move by any of the regular ways to move the entity. I have tried to change the .touch and .movetype to different settings, but it seems to make no difference. I have also tried to set the .groundentity = world but again, it makes no difference at that point. I am unclear as to how the groundentity field works and how to keep it from appearing as it appears to be .exe side code. From what I understand it is a field set to let the player take falling damage if he should fall and land on an entity (say a box or a door). If anyone knows how to either fix it when it sets the field or perhaps work a way around it so the field is never set then I would be thankful.
Mr Lenguini
 
Posts: 7
Joined: Fri Oct 22, 2004 2:35 am

maybe try this?

Postby RooT » Sat Sep 10, 2005 6:04 pm

hey i think i understand what you mean, and i have a suggestion but im no expert so dont get mad if im wrong :P if theres a section of code somewere that is called every time (nextthink = time + 0.1) put in a code like this:

void() soulthink =
{
self.flags = self.flags - FL_ONGROUND;
self.velocity = etc...
}

i duno if thats what you need, and i know its really simple so i hope you dont think im insulting your intellegence 8) but give it a try hope i helped
-Root one

Mod Status:
Turret Defense: 30%
UPS: 45%
User avatar
RooT
 
Posts: 40
Joined: Wed Sep 07, 2005 1:28 am

Postby RenegadeC » Sat Sep 10, 2005 6:56 pm

Yep RooT is right, all flying entities should have FL_ONGROUND removed. I did this for my mods flying AI.. which you can view here:

http://circa1984.com/renegade/QuakeC/ai_fly.txt

// prevent being stuck on the ground
if (self.flags & FL_ONGROUND)
self.flags = self.flags - FL_ONGROUND;
User avatar
RenegadeC
 
Posts: 391
Joined: Fri Oct 15, 2004 10:19 pm
Location: The freezing hell; Canada

Postby Spike » Sat Sep 10, 2005 7:41 pm

but you'll want to make sure that flag is actually set, before removing it.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Mr Lenguini » Sat Sep 10, 2005 7:54 pm

I really appreciate how fast you all here got back to me. That would explain why the .flags value went so high as well. Thanks.
Mr Lenguini
 
Posts: 7
Joined: Fri Oct 22, 2004 2:35 am

Postby RooT » Sat Sep 10, 2005 9:34 pm

no problem! im surprised i was right lol my first response to anyones question since im usualy not sure my way of coding is any good hah, well now im confident so if ya got anymore questions lemme know 8)
-Root one

Mod Status:
Turret Defense: 30%
UPS: 45%
User avatar
RooT
 
Posts: 40
Joined: Wed Sep 07, 2005 1:28 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 3 guests