Product Chat / Enemies pathfinding problem

Author
Message
Avenging Eagle
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 16th Apr 2017 14:12
If I place an enemy in my map to spawn at the start, it will wait until it can see me and then attack me. However, if I trigger that enemy to spawn when I enter a zone, it will spawn and immediately begin tracking towards me, regardless of whether it can see me or not, climbing over any terrain - even if it's near vertical - and attack me once in range. This happens with ai_soldier.lua. I hesitate to call it a bug as it might just be something I'm doing wrong, so I thought I'd ask the community.

Has anyone else had this problem and, if so, how can I solve it?

AE
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 16th Apr 2017 16:26
Will give it a try and see how it acts.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Wolf
Forum Support
16
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 17th Apr 2017 03:42
I've had this happen but have not found a cause or a solution so far.
I too will be looking into it. Its very possible that there is a simple fix.
Avenging Eagle
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 18th Apr 2017 18:57
Any progress? My only discovery so far has been that triggering a spawn over 3000 units away will stop the enemies immediately locking on to you...but once you are within the 3000 units, they will still traverse any and all terrain to cut a path to you 'as the crow flies'.

AE
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 18th Apr 2017 19:41
sure, here you go, if you need different ai scripts then you just move the init(e) section to the
Quote: "if g_Entity[e]['activated'] == 1 then "

part
and the main(e) section goes in the
Quote: "else"

part after it
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
Avenging Eagle
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 18th Apr 2017 22:11
Sorry smallg, that didn't work for me. I used the exact script you posted, and also tried a few different combinations

AE
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 20th Apr 2017 19:43
Something I've noticed lately with characters, their view cone and view range are defaulted to 0 for some reason.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 20th Apr 2017 21:07
Quote: "Something I've noticed lately with characters, their view cone and view range are defaulted to 0 for some reason."


Its been like that for a while .... The default cone angle seems to be the character can only see forward hence being able to walk up behind him .. Unless you place him facing you of course then he sees you instantly .... But you can set the cone angle to your preference .. 180 will give him a 360 view and instantly attack .... I'm not sure if that's just the way Lee set it so we can set our own ..
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 20th Apr 2017 23:56 Edited at: 20th Apr 2017 23:58
Yup, I know that one Syncromesh, the new part (at least for me) is the view distance is also at 0, it used to be at 2000 if I remember right, which is another reason why characters aren't reacting until you get close.

I can see why Lee would set it to 0, so we can change it ourselves, but for a new user, especially one of the "easy game maker" crowd, they would place a character then run test, and immediately complain it's not working, maybe it should be set at say a 45 degree angle and 2000 distance so it at least runs straight off the bat and new users won't complain it's broken.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.

Login to post a reply

Server time is: 2024-04-20 00:07:35
Your offset time is: 2024-04-20 00:07:35