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 / [GDK2.0] AI_SetEntityAttackDistance() doesn't work properly

Author
Message
Hawkblood
9
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 21st Jul 2012 18:53
I created 2 entities and made one friendly and the other enemy. They "attack" each other, but they slowly move away from each other.
It doesn't matter what I set the AI_SetEntityAttackDistance() value to, they do the same thing. I'm trying to get them to melee with each other-- not shoot guns at each other.

Does anyone know what I'm doing wrong?

The fastest code is the code never written.
Olby
15
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 22nd Jul 2012 00:18
Perhaps AI SET ENTITY AVOID DISTANCE() will do the trick.

Quote: "This command sets the avoidance distance an entity will use when attacking another entity. If the target becomes closer than this distance, by either one of them moving, this entity will move away from the target to a point at least this distance from the target in a strafing backwards action (whether or not Can Strafe is set). This effects both Cautious and Aggressive stances."



Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
Hawkblood
9
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 22nd Jul 2012 00:49
Tried them both. Still nothing.

The fastest code is the code never written.
Olby
15
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 22nd Jul 2012 14:58
Have you adjusted the AI SET AVOID MODE() accordingly. Additionally AI SET RADIUS() might affect entity-entity collisions.


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
Hawkblood
9
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 22nd Jul 2012 17:22
I think I already tried those also. I know I have AI_SetRadius to 1. That's the closest it can be.

The fastest code is the code never written.
Olby
15
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 22nd Jul 2012 18:01
If it's not an issue with GDK 2.0 command wrapping then it might be the automatic AI system's limitation. In which case manual mode is your best bet. You will need to manually process data received from AI system to control the entities. Takes some time to get it right but is really flexible.


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
Hawkblood
9
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 22nd Jul 2012 20:34
Yea, that's what I was afraid of. It won't be too hard, but now I have to make functions to govern this.

The fastest code is the code never written.

Login to post a reply

Server time is: 2019-06-25 19:56:03
Your offset time is: 2019-06-25 19:56:03