Product Chat / Waypoint loop?

Author
Message
Avenging Eagle
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 28th Jun 2017 21:05
Is it possible to make the last node of a waypoint path connect up to the first node, creating a loop?

Also, I seem to remember it being possible to create branching waypoint paths in FPSC, can Game Guru do this?

AE
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 29th Jun 2017 11:00
I never used FPSC that much to be sure but I seem to remember you could at least loop a path in it. I'm pretty sure you can't in GG though as yet.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 29th Jun 2017 11:02
I don't think you can on GameGuru, AI generally turns around and follows the path back to the start.

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.
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 29th Jun 2017 11:57 Edited at: 29th Jun 2017 11:57
The good news is that even though the waypoints are laid out in a linear line of connecting nodes, the actual logic of following them is written in LUA script, so you can basically do anything you want with the waypoint data. At the moment the default AI just walks the character backwards and forwards between first and last, but there is nothing to stop you creating your own script copy, and modifying the pathfinding logic to create a loop. Here is the code responsible, found in "GameGuru\Files\scriptbank\ai\module_combatcore.lua":


The magic bit is this section:

As you can see, if you left the 'ai_bot_pointdirection' variable alone and simply reset the 'ai_bot_pointindex' to zero, it would simply loop around. Just make sure your first node and last node are close together for a good looping motion.
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 29th Jun 2017 12:16 Edited at: 29th Jun 2017 12:18
Actually it is kind of possible although not sure how ...
Smallg did it here for Dagrod,s TRex.. Its just a single one line waypoint I'm using and he will loop each end like this like this all day

The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Avenging Eagle
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 29th Jun 2017 18:32 Edited at: 29th Jun 2017 18:33
Quote: "As you can see, if you left the 'ai_bot_pointdirection' variable alone and simply reset the 'ai_bot_pointindex' to zero, it would simply loop around. Just make sure your first node and last node are close together for a good looping motion."


This didn't quite work for me as my characters just kept wandering off into the wilderness, not knowing what point was next. After a little trial and error, however, I changed the code to this:


...and it now works fine

Next query; any chance it's possible to add a pause at each node? So, a switch back to idle for 5 seconds, and then carry on?

AE
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 29th Jun 2017 18:54
Quote: "
Next query; any chance it's possible to add a pause at each node? So, a switch back to idle for 5 seconds, and then carry on?"


Oh god please no, it used to pause at each point before, and it was one of the most griped about things in GG, it felt like the AI had got stuck working out where to go next. If that is added back, it needs to be entirely optional.

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.
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 29th Jun 2017 20:59
It would be cool to stop at certain waypoints and play a little animation,you could put one by a bush and have the character standing with he's head back looking relieved .

Dave
Windows 10 Pro
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM

Login to post a reply

Server time is: 2024-04-20 14:15:06
Your offset time is: 2024-04-20 14:15:06