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 / Entity can´t see Player?

Author
Message
Lani
17
Years of Service
User Offline
Joined: 14th Aug 2006
Location:
Posted: 25th Aug 2006 09:37
I am fiddling with implementing Dark AI in a project, and having some success.. however, a very important part is for some reason not working, namely getting an entity to "see" the player.

Whatever I do, the "AI Get Entity Can See (119, ai get player x(), ai get player z(), 1)" command always returns 0 - even when the player is directly on top of the entity in question (the AI entity is number 119).

I´ve tried setting the view distance, and tried leaving it on default.

The player ai entity is set correctly, as is the friendly object. I can get the entity to follow the player no problem, which makes it even more confusing.

If you need more details, please let me know and I´ll provide them. But I´m starting to think I´m missing something fundamental to the "see" command.

Any advice much appreciated,

Thanks for reading.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 25th Aug 2006 14:21
Any chance of making a small demo of what you are doing say a cube and a cone, having said that(funny shouldn't that be write) I though I saw an AI demo on doing this.

Dark Physics makes any hot drink go cold.
Lani
17
Years of Service
User Offline
Joined: 14th Aug 2006
Location:
Posted: 28th Aug 2006 13:34
Well I am going back to the basics (no pun intended) and it seems there are some anomalies with the "can see" command, not that it isn´t working (at least I won´t conclude that yet), but it´s not behaving entirely as I expected - still, that could be because I simply don´t know what to do with it at this time. Will keep you updated .
Lani
17
Years of Service
User Offline
Joined: 14th Aug 2006
Location:
Posted: 28th Aug 2006 14:13 Edited at: 28th Aug 2006 14:14
Ok, this is the essence of the problem:

the following (very simple) code, should return a 1 or 2 for the "cansee#" variables, the "enemy" (the evil evil cube) obviously reacts to the player entity (the nice sphere).. but the checks to see whether the enemy can see the player return 0 all the time, which I don´t understand.



Any help much appreciated, I know you can do it

edit: the controls etc are very simple simply to test, the end product features something a little more complicated
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 28th Aug 2006 18:03 Edited at: 28th Aug 2006 18:08
well if I make height ground both 1 you get zero if to far away and two when sttting on it.



edit
reading your post again I see that not what your after ,your looking for away that says it saw you or you saw it.
??

Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 28th Aug 2006 18:26
just remebered this one

AI Set Console Output On 1

shows whats going on, make main prog a windowed prog.

Dark Physics makes any hot drink go cold.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 28th Aug 2006 23:07
This is a bug in the CAN SEE command, fixed for next update.
Lani
17
Years of Service
User Offline
Joined: 14th Aug 2006
Location:
Posted: 28th Aug 2006 23:10 Edited at: 28th Aug 2006 23:21
Quote: "This is a bug in the CAN SEE command, fixed for next update."


Good news, no wonder I couldn´t get my head around it then. Any idea on when that update will be? I can live without it for now, but any info on when I can fix this (to pass on to the boss) would be good.

HowDo: Thanks for your replies No I am simply in need of a check to see whether the enemy can see my player entity, and if so execute some commmands.

As a side note, the AI system in Dark AI seems to be geared for shooting, and not for implementing melee combat, since there´s apparently no way to make enemies go close to the player - they move away if I approach them. I assume I would have to disable the automatic behaviour in that case?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 29th Aug 2006 15:56
Quote: "Any idea on when that update will be?"


Soon, I can't say exactly when.

Quote: "the AI system in Dark AI seems to be geared for shooting, and not for implementing melee combat, since there´s apparently no way to make enemies go close to the player - they move away if I approach them"


Check out the AI SET ENTITY ATTACK DISTANCE and AI SET ENTITY AVOID DISTANCE commands to change the distance that entities approach/run away.

Login to post a reply

Server time is: 2024-03-29 11:22:53
Your offset time is: 2024-03-29 11:22:53