Scripts / pClosest = 99999 inside module_combatcore.lua

Author
Message
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 11th Apr 2017 10:49 Edited at: 11th Apr 2017 11:01
i have found this line : pClosest = 99999 inside module_combatcore.lua
its in the patrol/ way point part.
i dont thinks this is correct . because of this 99999 the ai go to the way point even if it is at the end of the map.
once i change it to a smaller value then it works correctly.
what must the default setting be, or must it be like this.



As long as it is 99999 then all the ai on the map goes to the way point/ path
with a smaller value then only the one's closest to it got to waypiont
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 11th Apr 2017 11:22
I think it's been set to 99999 as the default to ensure that it will always head to a waypoint no matter where you put it, which can be annoying, good catch mate, probably a good idea to drop it down to a lowish number.

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.
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 11th Apr 2017 11:23 Edited at: 11th Apr 2017 11:27
ok i have look again at the script, there is a part that is been taken out.
this line is taken out: -- and pDist < 200 then




if i leave pClosest = 99999 , and put the part of -- and pDist < 200 then back in the script then all works fine.

For Lee.
Lee i just want to know if i can put -- and pDist < 200 then back in the module_combatcore.lua or will it make an problem somewhere else in the script. so far it looks like its working correctly if i put it back, then one of my problems is gone.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 11th Apr 2017 12:15
I think it's probably been commented out while Lee was testing something, and he forgot to put it back, hopefully that's the only reason for it and we can fix it, someone give PCSkiller a high five for finding it!

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.
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 11th Apr 2017 15:10
I noticed this but I assumed its because the ai can be set to patrol paths or not now so you just swap their ability for the ones that aren't near waypoints, I think the old system works fine though and see no reason not to still include at least some form of max distance.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 11th Apr 2017 15:43

what i would like to know, is there any chance to let them walk normal when they patrol a path, would be nice to see them walk normal like in the old script
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 11th Apr 2017 19:16
Quote: "what i would like to know, is there any chance to let them walk normal when they patrol a path, would be nice to see them walk normal like in the old script "

you should be able to make them move with an animation with the command
MoveWithAnimation(e,#)
but from testing i don't think it works (at least not for the soldiers).
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 12th Apr 2017 12:12
Thanks, well spotted! Also, the MoveWithAnimation command only works with special animations (typically from motion capture sequences) where the spine of the character moves away from the models default center position. It's great for characters from Fuse and animated in Mixamo as it produces perfect foot planting, but for characters that constantly center the character at the models 0,0,0 position during the animation sequence it would do very little. The command you need for regular model animations is: MoveForward
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 12th Apr 2017 13:04
Thanks Lee,
I will try it.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

Login to post a reply

Server time is: 2024-12-23 04:56:35
Your offset time is: 2024-12-23 04:56:35