Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Problem with .GroundEntity

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
Mr Lenguini Joined: 22 Oct 2004 Posts: 7 |

Posted: Sat Sep 10, 2005 4:54 pm Post subject: Problem with .GroundEntity |

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.

Back to top |

RooT Joined: 07 Sep 2005 Posts: 40 |

Posted: Sat Sep 10, 2005 6:04 pm Post subject: maybe try this? |

hey i think i understand what you mean, and i have a suggestion but im no expert so dont get mad if im wrong 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 but give it a try hope i helped
-Root one
_________________
My mod site!
Mod Status:
Turret Defense: 30%
UPS: 45%

Back to top |

RenegadeC Joined: 15 Oct 2004 Posts: 370 Location: The freezing hell; Canada |

Posted: Sat Sep 10, 2005 6:56 pm Post subject: |

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;

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Sat Sep 10, 2005 7:41 pm Post subject: |

but you'll want to make sure that flag is actually set, before removing it.

Back to top |

Mr Lenguini Joined: 22 Oct 2004 Posts: 7 |

Posted: Sat Sep 10, 2005 7:54 pm Post subject: |

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.

Back to top |

RooT Joined: 07 Sep 2005 Posts: 40 |

Posted: Sat Sep 10, 2005 9:34 pm Post subject: |

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 -Root one _________________ My mod site! Mod Status:
Turret Defense: 30%
UPS: 45%

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

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