generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: general opinion question

Previous Thread :: Next Thread 
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
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
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
26 Jul 2016 05:46 PM
b


Add 13,000 posts
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
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
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
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
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
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
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
26 Jul 2016 06:24 PM
b


Add 13,000 posts
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
26 Jul 2016 06:26 PM
is it that hard to make them not go through trees and rocks?
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
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
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
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
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
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 is not online. 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
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
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
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
26 Jul 2016 06:47 PM
http://wiki.roblox.com/index.php?title=Pathfinding
Report Abuse
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
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
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
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
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image