FPSPwnz0r
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 2737 |
|
|
| 05 Sep 2016 02:46 AM |
Say I want to make an NPC that constantly follows you regardless of where you are. I read on the wiki that you have to use ComputeRawPathAsync and use the position of where you start, where it ends, and the max distance of the path. So in this case, the first position would be where the NPC is and where it ends is the player, and the max distance can be infinite. Wouldn't you have to constantly check it?
Could you just make a loop to constantly check it? Or does CheckOcclusionAsync do that already? Is my whole idea of how pathfinding works wrong??
(note that I haven't actually tried pathfinding, I'm just a bit curious as to how it works. I just wanted to see if I could eventually make a game similar to Silence by Venvious. sorry, I'm a fr00b at this. ;-;)
|
|
|
| Report Abuse |
|
|
FPSPwnz0r
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 2737 |
|
| |
|
FPSPwnz0r
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 2737 |
|
| |
|
FPSPwnz0r
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 2737 |
|
| |
|
FPSPwnz0r
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 2737 |
|
|
| 05 Sep 2016 11:43 PM |
this is getting as much attention as my posts for my other game XD
|
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 06 Sep 2016 12:15 AM |
maxdistance will always be 500, otherwise it will return an error/nil
you would need to recheck more often as the zombie got closer to the original position of the player, in order to minimize performance issues and maximize 'chaseability'
|
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 12:33 AM |
use Smooth and not Raw, it makes bezier curves and is more smooth
also have 1 big script controlling all AI or bind the AI to an event like Heartbeat so that there is limited server side lag |
|
|
| Report Abuse |
|
|
FPSPwnz0r
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 2737 |
|
|
| 06 Sep 2016 01:03 AM |
oh, okay thanks! the tip about using Smooth is handy
noted, I want to start out serious game development when I have the time, most of what I've made are just little experiments
|
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 06 Sep 2016 02:39 AM |
Raycast a ray to the player if you can simply walk towards them, if so do that. If something is blocking the ray, use pathfinding. |
|
|
| Report Abuse |
|
|
FPSPwnz0r
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 2737 |
|
| |
|
|
| 06 Sep 2016 08:11 PM |
| https://www.youtube.com/watch?v=WFEvyMmwzOE |
|
|
| Report Abuse |
|
|
FPSPwnz0r
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 2737 |
|
| |
|