Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Jittery enemies ? [Dark AI]

Author
Message
Lani
18
Years of Service
User Offline
Joined: 14th Aug 2006
Location:
Posted: 3rd Oct 2006 17:31
I am having a bit of a problem with the AI behaviour of an enemy in my project.

It´s supposed to be a melee opponent, and as such has it´s attack distance set low (to 10, any less seems to give problems).

However after it moves in and starts attacking (as it should), it´ll occasionally dance around the player, even though the player doesn´t move at all.

Is there any way to stop that?

I´ve included a no-media-required very simple example of it, you may need to wait a few seconds after it reaches the player before this happens. The player is Red, the monster Blue.



The reason I control the object placement manually is to cause minimum problems with Dark Physics, which I also use (though the monsters don´t interact with the physics engine at all).

Help much appreciated, as always

If you need more info, please let me know. Cheers!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 3rd Oct 2006 19:00
By default entities randomly strafe their targets so they don't just stand and attack. However you can turn this off with the "AI set entity can strafe" command set to 0.
Lani
18
Years of Service
User Offline
Joined: 14th Aug 2006
Location:
Posted: 4th Oct 2006 16:10
Thanks Paul, that did it. Should have found that one myself really, but somehow I missed it.

I have another question though, if I use this code:



The monster will act right until I move the character out of it´s range, and for some reason it will then move over to the obstacle, and move around that for a while, until it removes the player from the target list.

Is there a way to wipe an entity´s target list manually? I don´t really want to do this, but it´s the only thing I can think of at this point. The reason I use "AI Add Obstacle From Level" is that in the main project the level file is too complex to define via the other commands.

Once again it could be a relatively easy thing I´m missing, but it might not.

I´ve tried manually forcing it to return to it´s idle point if it´s "Stopped" and still targeting object 5, but it doesn´t work - the entity will move towards it´s idle point for a few seconds, then return to the box.

Anyone have any info on this, is it a known bug, a result of some command I´m using, or? Also, despite having status as "moving forward", the object is still looking at the player entity as it slides towards the box, though I imagine that´ll be because he´s still its target, since after it drops the target and returns to it´s idle position (on it´s own), it´s once again looking the way it´s travelling.

Cheers all!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Oct 2006 19:06
When the entity loses sight of you it tries searching for you, it does this by looking for a nearby waypoint. Since the only waypoints are around the cube that's where it goes. You can solve this by either using "AI Set Entity Can Search" set to 0, or placing more waypoints manually around the level so the entity has more choices. Placing more obstacles would also add more waypoints.

Login to post a reply

Server time is: 2024-11-24 14:27:47
Your offset time is: 2024-11-24 14:27:47