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 / enemy ALWAYS able to see character?

Author
Message
Mugen Wizardry
User Banned
Posted: 14th May 2010 23:04
hi all, for some reason, this code is making it so that my guard ALWAYS has an infinite "LOS" or Line Of Sight...

how can i fix this?

HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 15th May 2010 00:15 Edited at: 15th May 2010 00:18
look up AI SET ENTITY VIEW ARC

edit

and AI SET ENTITY VIEW RANGE

Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 15th May 2010 01:21
still not working.

i added them

entomophobiac
17
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 17th May 2010 02:02
As far as I can tell, you only check whether the AI spots the player before the main loop. The "iseeu" variable is never updated.

This check must be made every sync and hence must be placed inside the main loop, or it'll always use the value you set before "do."
Mugen Wizardry
User Banned
Posted: 17th May 2010 03:59
ok now iseeu is always 0..



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 17th May 2010 18:45
like so:



Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 17th May 2010 19:37
i did do that..



it must have pasted the old code..

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 17th May 2010 19:58
ok, this works..

but idk why.

is this the right coordinates?

iseeu = ai get entity can see(1,10,10,1)

10=X, 10=Z

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 17th May 2010 21:12
Did you put your code back to this


I think it works out if the entity is looking at your camera's x,y .

Now you found out were this code should go see if works.

Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 17th May 2010 21:32
it worked a little.



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 17th May 2010 22:25
try this bit



Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 01:18
ok, for some reason, he can ONLY see my character..

IF he's positioned at 30,0,30..

i even made the points visible



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th May 2010 01:45
how big is the dwarf?
Plus what's your question?

The code is only checking to see if the entity can see the camera.

Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 02:13
the dwarf is the size of
whatever psionic made it.

he can ONLY see my character when the
model is at 30,0,30.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th May 2010 02:22
this what model I have been using to test your code



it in the help file so it should slot straight in, try it with that then tell me if the model is smaller or bigger than the one you are using. Sounds like its bigger.

Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 15:21


its a BIT smaller.

and its doing the same thing.

its checking iseeu only at 30,0,30

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th May 2010 16:15
here how I see this working.

iseeu = 2 - if the the point is within the inner view arc[this is not set].
iseeu = 1 - if the point is within the outer view arc [set as 1 for straight ahead].
iseeu = 0 - if the point cannot be seen [not in range or facing camera].

Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 17:22
then why does it only work at
30,0,30?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th May 2010 18:00
When I run your code here I get iseeu=1 to start and iseeu=0 when at 30,0,30, is that what you are getting.

Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 18:06
yes.

but when he's inbetween moving to 0,0,0,

or at 0,0,0, iseeu always = 0

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th May 2010 18:22
This set viewing arc AI SET ENTITY VIEW ARC 1= straight ahead only 120 = wide angle view.
This set how far away it can see AI SET ENTITY VIEW RANGE 4= units
or 50 in view but only if facing you.

run below to see what I mean, when it turns around it can see you now.



Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 18:27
yea. it sorta works.

see the thing is,

it's supposed to work sorta like WoW.

no matter WHERE the enemy is,

the enemy can see you

IF you're close enough

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th May 2010 18:34
change this to AI SET ENTITY VIEW RANGE 1,1000 then it can see you if you are within the 1000 range limit.

Bit of shooting in the dark as I've not seen or played WoW.

Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 18:39
ok. now what its doing is

it's working, HOWEVER.

when he has his back turned to you,

it should be 0.

it's still 1

when his back's turned

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th May 2010 18:51
does this make it do it.



default is about 2.5.

Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 19:02
sorta.

whenever i try to

go behind the guard,

iseeu still = 1

is there an easier

way to go about

doing this?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th May 2010 19:15
try putting a wall to hide behind then see.

I just added a player to your code now all is does is Attack me even when out side the sphere. <- sphere not added to container so it not seen as a obstacle to hide behind.

Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 19:17
woh wait. so he

attacked u even when

outside the sphere?

can i see ur code?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th May 2010 19:19


Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 19:23
that is just NOT right.

why is he doing that?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th May 2010 19:32
because we are in line of sight plus just seen that you use camera 1 in your code, no wonder I was having a hard time think it was the default camera 0.

change most of it to camera 1 but still see me and can turn around faster than I can control the camera.

I would take this bit out and continue with what you were doing until it works right then added this bit until that works.

A bit like getting a car and bike at the same time which do you choose to master. you would not get far if you did both at the same time.

Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 19:35
is there a way u can make it so that he always sees the player ONLY if his back is not turned towards the player?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th May 2010 19:40
I change the range to 20, now if I am under 20 units away he will turn and attack me else he'll carry on patrolling.

So it seem you have to decide how far away the range is to be.

Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 19:48
now he's going nuts



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 18th May 2010 20:15
Will soon know all there is to know on how to make a Mad Entity!

Think of what you've learned doing this.

1. how to set the view range and angle.
2. how to make a way point system.
3. how to set the model to face the correct direction.
4. how to set the patrol time.
5. how to set the speed of the Entity.
6. how to show what the entity is doing and thinking.
7. how to get what the entity is seeing.

Dark Physics makes any hot drink go cold.
Mugen Wizardry
User Banned
Posted: 18th May 2010 20:20
i know!

Learning r fun!

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Mugen Wizardry
User Banned
Posted: 19th May 2010 15:51
so is there a function to tell when the enemy has his back turned and cant see the character?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
HowDo
17
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 19th May 2010 16:04
there you go complete list of AI commands



Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2019-12-06 23:41:03
Your offset time is: 2019-12-06 23:41:03