Product Chat / Enemy can't find me !

Author
Message
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 29th Jul 2021 10:09 Edited at: 29th Jul 2021 10:10
Hi i'm doing some test, i did a very basic place like a small layrinth with a floor zone covering the place.
i put a sphere but the sphere CAN'T find me, i need the sphere always run after me, like a pac-man idea !
How can i do that, i'm stuck !
My Portfolio: https://www.mattepainting.be/
My FREE extension: https://www.stop-it.be/

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 29th Jul 2021 10:23
Have you set the sphere to be a character and attached some sort of ai script to it?
Been there, done that, got all the T-Shirts!
PM
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 29th Jul 2021 10:29 Edited at: 29th Jul 2021 10:29
this is my script:
My Portfolio: https://www.mattepainting.be/
My FREE extension: https://www.stop-it.be/
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 29th Jul 2021 11:03
Is your .fpe setup as a character?
I think you need that.
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 29th Jul 2021 11:15 Edited at: 29th Jul 2021 11:25
how i do that ?
in the fpe i put

ischaracter = 1

but it changes nothing
My Portfolio: https://www.mattepainting.be/
My FREE extension: https://www.stop-it.be/
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th Jul 2021 20:23
well this just tells the ball to move in the direction of the player so it will just get stuck on anything in between it and the player... you need to use actual path finding to go around the maze... i.e. use the actual AI logic
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 30th Jul 2021 21:00
Yes and even then, with the AI, it will get stuck sometimes so you have to detect this and then reset the chaser - best in a reverse direction to where the player is looking. Makes for some great sudden catch-ups.

Cheers.
GPU: GeForce RTX 2070 SUPER PassMark: 18125
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 30th Jul 2021 21:27 Edited at: 30th Jul 2021 21:28
Somebody posted some handy invisible entities with curved shapes that can be placed strategically to minimise the AI getting stuck, worked really well IIRC.

But as I already said you need to use AI commands on characters so they can make use of the built in navigation grid thingy.
Been there, done that, got all the T-Shirts!
PM
granada
Forum Support
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 30th Jul 2021 23:20
This is it I think , might help
https://forum.game-guru.com/thread/221251

Dave
Windows 10 Pro 64 bit
GeForce RTX™ 2070 GAMING OC 8G
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
3840 x 2160 ,60 Hz
PM
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 31st Jul 2021 07:46
Whaouw, thanks granada i'm going to try that
My Portfolio: https://www.mattepainting.be/
My FREE extension: https://www.stop-it.be/
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 31st Jul 2021 08:14 Edited at: 31st Jul 2021 09:26
i tested it but it's not working because my model is a 3D one object labyrinth the walls are too thick !
i'm not going to use prefabs from GG because the labyrinth is going to be textured at the end with various illustrations on the walls .
my entity can't turn around corners

i tested EVERY entity, with EVERY scrip in GG, nothing works, entities CAN'T find the player in a custom made small labyrinth !
EVEN if i put the view angle 360° and distance to 1000, they see the player but cant walk to it, 99% of time they get STUCK in the walls !

My object is working perfectly, imported in GG with the right collision polygonal.

ALL those problems come from the LUA scripts, they don't work at all !

What the entities absolutely NEED is a detection zone for the walls when that circle enter in collision then the entity need to move away following his actual direction, that way we prevent the entieties to collide & stay stuck inside the walls !
My Portfolio: https://www.mattepainting.be/
My FREE extension: https://www.stop-it.be/

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 31st Jul 2021 13:00 Edited at: 31st Jul 2021 13:29
Yep, AI pathfinding isn't going to work inside a single object.

You would have to write your own path finding algorithm.
https://en.wikipedia.org/wiki/Pathfinding

You could try turning physics off on the main model and placing invisible walls for the AI path generation.
Been there, done that, got all the T-Shirts!
PM
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 31st Jul 2021 13:59 Edited at: 31st Jul 2021 13:59
well i would like to write my own lua but i don't understand the structure,
look like the scripts are calling external multiple lua scripts !
My Portfolio: https://www.mattepainting.be/
My FREE extension: https://www.stop-it.be/
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 31st Jul 2021 14:37
Try the invisible wall approach then, if you turn off physics for the main 'maze' entity and mark out the pathways using invisible walls then the AI pathfinding should work.
Been there, done that, got all the T-Shirts!
PM
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 31st Jul 2021 17:34
i would like to know how to tell to my entity to move to a trigger zone
My Portfolio: https://www.mattepainting.be/
My FREE extension: https://www.stop-it.be/
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 31st Jul 2021 18:21 Edited at: 31st Jul 2021 18:21
Quote: "i would like to know how to tell to my entity to move to a trigger zone"

I dont think it will activate it though ?
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 31st Jul 2021 18:32
In the trigger zone script you need to store the position of it such that the entity script can read it, then in the entity script use that as your target position to move to.
Been there, done that, got all the T-Shirts!
PM
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 1st Aug 2021 08:45
how i can do that?
My Portfolio: https://www.mattepainting.be/
My FREE extension: https://www.stop-it.be/
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 1st Aug 2021 09:36 Edited at: 1st Aug 2021 09:39
Quote: "i tested EVERY entity, with EVERY scrip in GG, nothing works, entities CAN'T find the player in a custom made small labyrinth !"


Did you try to test the Drone security , because i made a small maze and put a
drone there with his script : . scifi\ai_patrolsecurity.lua
and i made the range 4000 , he then find me with out bumping in to the walls.
Maybe you can some how use his script and mod it to work with your model.

Just a thought.
Windows 10 Pro 64-bit
Intel(R) Core(TM) i5-4590S CPU @ 3.00GHz
RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 7th Aug 2021 16:55
i don't have this: scifi\ai_patrolsecurity.lua

My Portfolio: https://www.mattepainting.be/
My FREE extension: https://www.stop-it.be/
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 7th Aug 2021 17:36
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 7th Aug 2021 23:21 Edited at: 7th Aug 2021 23:22
Quote: "i don't have this: scifi\ai_patrolsecurity.lua"

Its part of the Sci-Fi Mars DLC
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 10th Aug 2021 21:35 Edited at: 10th Aug 2021 21:37
In one of these threads I suggested using an AI follower object to navigate and follow the player then have a physics object be pushed along to follow the follower object.

Here is a video showing what I meant:

The little ball is under AI control and the large ball is the physics ball, this is just a simple example, more logic is required to control the speed and ensure the physics ball stays in visual contact with the follower entity.
Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-11-21 14:14:35
Your offset time is: 2024-11-21 14:14:35