Lem0nzz
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 926 |
|
|
| 06 Mar 2014 10:26 AM |
| What's a good script, that would allow zombies not to bump into walls while they chase you? |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2014 10:27 AM |
You'd have to use pathfinding. http://wiki.roblox.com/index.php/Algorithms
The most common pathfinding algorithm: http://wiki.roblox.com/index.php?title=A* |
|
|
| Report Abuse |
|
|
Lem0nzz
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 926 |
|
|
| 06 Mar 2014 10:30 AM |
| So kinda like checkpoints? Like if a zombie touched a wall it would move to the right or so? |
|
|
| Report Abuse |
|
|
| |
|
polodna5
|
  |
| Joined: 03 Aug 2011 |
| Total Posts: 7917 |
|
|
| 06 Mar 2014 12:43 PM |
| But of you code it to scan what's around it, it could lose you. |
|
|
| Report Abuse |
|
|
Lem0nzz
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 926 |
|
|
| 07 Mar 2014 09:03 AM |
| Yeah, that's what I've been thinking. I want to make one that can avoid walls, without having to worry about checkpoints. Maybe I could try making them follow footsteps of the target they attack? But then if they moved backwards and forth the zombie would do that. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2014 09:29 AM |
However you can also use a reactionary AI, that raycasts to its objective, checks for parts in front of it, gets the connected parts, and move it accordingly.
Pathfinding would be easier tho. |
|
|
| Report Abuse |
|
|
Lem0nzz
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 926 |
|
|
| 07 Mar 2014 09:58 AM |
| Eh, Zombies are glitchy.. I don't know how to do pathfinding, and it doesn't make any sense to me. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2014 10:00 AM |
Its simple.
Raycast to a point you want the zombie to reach (a player, or something like that), and make the zombie react to the obstacles it hits.
I call it reactionary AI |
|
|
| Report Abuse |
|
|
Lem0nzz
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 926 |
|
| |
|
|
| 07 Mar 2014 10:03 AM |
Unfortunately, I lost my AI's in my two terminations, as they werent saved to my PC.
Its pretty easy to make yourself though. |
|
|
| Report Abuse |
|
|
Lem0nzz
|
  |
| Joined: 18 Jul 2011 |
| Total Posts: 926 |
|
|
| 07 Mar 2014 10:06 AM |
| I will attempt to try myself. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2014 10:24 AM |
| if ZombieSeesPlayer.Value == true then Zombie:RipThroughTimeAndSpace(Universe, Player.Torso.p) |
|
|
| Report Abuse |
|
|