|
| 26 Jul 2016 05:32 PM |
would it be ok if my enemies were able to go through trees and rocks
or would that look bad
not sure
because trees are everywhere
Add 13,000 posts |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Jul 2016 05:50 PM |
The only way to fix that is to learn how to script PathFinding by looking up tutorials and usage on the wiki or anywhere else.
After you do that your character will most likely try not to walk into any objects.
OR
you can check to see if there is an object around the character by getting parts in region3 and making sure that the floor and characters are ignored. Then you can make it so that they try not to walk into said object but both ways are slightly difficult and if you want my opinion: For a game with advanced AI, no. For a game that is simple and fun and not really based on AI, yes. |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 05:51 PM |
they're just one part enemies
i move them with body position lol
so they're already simplistic in that sense
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 05:51 PM |
oh, i have an idea
i'll make it slightly transparent if it's being touched
Add 13,000 posts |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Jul 2016 06:26 PM |
| is it that hard to make them not go through trees and rocks? |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 06:27 PM |
| You need something that can detect if there is an obstruction in the way, normal movement works like a line segment, they try to move into that place no matter what is in the way |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 06:27 PM |
"is it that hard to make them not go through trees and rocks?"
if i'm using a body position how would i do it
because my mind is blank right now
if nothing will work i'll just resort to transparency when touched
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 06:35 PM |
idk use raycasting to see if there is a straight line to position
if not, create some sort of path? |
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 26 Jul 2016 06:44 PM |
| Are all trees same size, are they spaced evenly? Does efficiency matter as in it may be slower for these guys |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 06:45 PM |
"Are all trees same size, are they spaced evenly? Does efficiency matter as in it may be slower for these guys"
yeah, i guess
i might use my transparency idea
they're just blocks that move to random spots
they get glitched out if they hit an obstacle
might look better if i use transparency on obstacles when they're being touched
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 06:47 PM |
| http://wiki.roblox.com/index.php?title=Pathfinding |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 06:51 PM |
@daily
oh that would probably work
i can just set the body position to the set of points for it to reach its goal?
ok how do i keep checking for paths if one is not a success
or is it always a success
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 06:52 PM |
It is always a success unless it appears to be over 500 studs in length total.
just do
if points[2] then
local direction = (torso.Position-points[2]).Unit*2000
humanoid:MoveTo(direction)
end |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 07:18 PM |
@blarg
moves extremely slow and still bugs out sometimes, not because of the script
maybe just making the enemy not collidable
Add 13,000 posts |
|
|
| Report Abuse |
|
|