Scripts / [HELP] More distant A.I.?

Author
Message
VitorHL
9
Years of Service
User Offline
Joined: 18th Aug 2015
Location:
Posted: 19th Aug 2015 14:54
First: Sorry for my horrible english. I am Brazilian

With the name of the post all already know what it is ...

I wonder if it is possible to increase the distance of AI in GG.

Because when you are far from a NPC his AI does not work and he is stopped without any animation (when it comes to a custom char some body parts are in error)
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 19th Aug 2015 16:48
Yes it is, Duplicate the scripts, Change the name, and the name of the _init and _main function to match the new name. then go into them and change the ranges. Increase them to 3000 or more, then you can use the view range in the properties panel up to that range.
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

VitorHL
9
Years of Service
User Offline
Joined: 18th Aug 2015
Location:
Posted: 19th Aug 2015 17:53
Did not work.

I think I missed something ... that is to change ouch to 3000?

DistFromPath?
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 19th Aug 2015 18:00
Which script are you modifying?
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

VitorHL
9
Years of Service
User Offline
Joined: 18th Aug 2015
Location:
Posted: 19th Aug 2015 18:12 Edited at: 19th Aug 2015 18:13
The A.I. of the char...

which was to change? global.lua?
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 19th Aug 2015 18:17
Dont change the global.LUA file.

Watch this twitch feed, explaining AI scripting.
http://www.twitch.tv/gamegurulee/v/11702578

Then we will continue.
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

VitorHL
9
Years of Service
User Offline
Joined: 18th Aug 2015
Location:
Posted: 19th Aug 2015 18:33
Thank you for your help!
but... as I said I am Brazilian and I have a very good English, then see a video in English and understand everything is very difficult!

PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 19th Aug 2015 21:02
Not to difficult. Where you see the PDist statements is the ranges of activation.
Look for PDist=600 and change it to 3000.

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

VitorHL
9
Years of Service
User Offline
Joined: 18th Aug 2015
Location:
Posted: 19th Aug 2015 21:58
which script? I did not think in the soldier.lua
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 19th Aug 2015 22:30
Which character are you using, if you go into the properties panel for it. the should be the name of the script it is using.
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

smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 20th Aug 2015 19:03
player is not "visible" until 1500 distance away - this is hard coded (meaning you will not get shot until you get inside this range)

however you can make the AI react and move forward at larger distances by adjusting line 147 to this
Quote: "if PlayerDist < AIGetEntityViewRange(EntObjNo) or AIGetEntityHeardSound(EntObjNo) == 1 then"

and then increasing the view range property to the desired range

note though due to the limit mentioned above it may cause them to stand and stare from a distance
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
VitorHL
9
Years of Service
User Offline
Joined: 18th Aug 2015
Location:
Posted: 20th Aug 2015 19:22
no I have not found in any of the AI scripts.

I used Ctrl + F and found nothing!

you sure this is right? sure that this updated information?

If yes please could you pass me the script ready? because I can not make it work.
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 20th Aug 2015 19:26
you will not find it because that is the edited result
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Attachments

Login to view attachments
VitorHL
9
Years of Service
User Offline
Joined: 18th Aug 2015
Location:
Posted: 20th Aug 2015 19:37 Edited at: 20th Aug 2015 19:46
Oh thanks man! I gave the answer "I did not find it" had been for the Pirate Myke.

but that does not resolved my problem that made enemies sighting me further however long distances AI remains off. Even the waypoint A. I. walks

EDIT: for some reason it made several of my custom characters become even more errors in distance, including some stay in different positions from what I put
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 20th Aug 2015 22:07
you need to turn them
Quote: "Always active = yes"
too, i thought that had already been said but apparently not
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
VitorHL
9
Years of Service
User Offline
Joined: 18th Aug 2015
Location:
Posted: 20th Aug 2015 22:28
THANK YOU! it works! you saved my life! I owe you a favor.
If you do not probably were a man I would marry you!
PM

Login to post a reply

Server time is: 2024-12-22 05:07:57
Your offset time is: 2024-12-22 05:07:57