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 » Scripting Helpers
Home Search
 

Re: I need some advice.

Previous Thread :: Next Thread 
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 04:38 AM
What would be the best way for that monster to follow a certain path of bricks when it is not chasing a player?
MoveTo doesn't always work, maybe stopping before the brick, or in a loop, not moving to the second brick.

Soup's on, everybody!
~LuaLearners Writer~
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 04:39 AM
a monster*

Soup's on, everybody!
~LuaLearners Writer~
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
30 May 2013 04:42 AM
Did you make sure you were using MoveTo() on the humanoid?
You know it makes it walk... Correct?

~ ∂◊и'₮ サ∆₮∑ ◊и ₮サ∑ ㄅⅰббㄚ ~
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 04:54 AM
I put a square of 4 blocks, and used MoveTo on the Humanoid. The monster moved to the first block, then when I pushed it kept going to the first block.

Soup's on, everybody!
~LuaLearners Writer~
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
30 May 2013 04:58 AM
-Put this in the monster. Edit the stuff I noted, pl0x.


local pos1 = Block 1's coordinates ONLY. ex. 1,1,1
local pos2 = Block 2's
local pos3 = Block 3's
local pos4 = Block 4's

while wait() do
local hum = script.Parent.Humanoid
hum:MoveTo(Vector3.new(pos1))
wait(10) --Put desired amt. of time
hum:MoveTo(Vector3.new(pos2))
wait(10) --Again
hum:MoveTo(Vector3.new(pos3))
wait(10) --Again
hum:MoveTo(Vector3.new(pos4))
end

~ ∂◊и'₮ サ∆₮∑ ◊и ₮サ∑ ㄅⅰббㄚ ~
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
30 May 2013 04:59 AM
Not sure if it's what you wanted... But it would continually move between all the blocks.

~ ∂◊и'₮ サ∆₮∑ ◊и ₮サ∑ ㄅⅰббㄚ ~
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 05:02 AM
I'll just test it.
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
30 May 2013 05:03 AM
Forgot a wait()... Oops. xD








local pos1 = Block 1's coordinates ONLY. ex. 1,1,1
local pos2 = Block 2's
local pos3 = Block 3's
local pos4 = Block 4's

while wait() do
local hum = script.Parent.Humanoid
hum:MoveTo(Vector3.new(pos1))
wait(10) --Put desired amt. of time
hum:MoveTo(Vector3.new(pos2))
wait(10) --Again
hum:MoveTo(Vector3.new(pos3))
wait(10) --Again
hum:MoveTo(Vector3.new(pos4))
wait(10)
end

~ ∂◊и'₮ サ∆₮∑ ◊и ₮サ∑ ㄅⅰббㄚ ~
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 05:07 AM
11:05:55.159 - Argument 2 missing or nil

On the MoveTo's

Soup's on, everybody!
~LuaLearners Writer~
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 05:08 AM
function FollowTrail()
local pos1 = -152.5, 2.6, -68.5
local pos2 = -152.5, 2.4, -51.5
local pos3 = -137.5, 2.6, -68.5
local pos4 = -137.5, 2.8, -51.5
while wait() do
local hum = script.Parent.Humanoid
hum:MoveTo(Vector3.new(pos1))
wait(3) --Put desired amt. of time
hum:MoveTo(Vector3.new(pos2))
wait(3) --Again
hum:MoveTo(Vector3.new(pos3))
wait(3) --Again
hum:MoveTo(Vector3.new(pos4))
end
end
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
30 May 2013 05:08 AM
wut. o-o

~ ∂◊и'₮ サ∆₮∑ ◊и ₮サ∑ ㄅⅰббㄚ ~
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 05:11 AM
The MoveTo needs 2 arguments.

Soup's on, everybody!
~LuaLearners Writer~
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
30 May 2013 05:28 AM
It's odd how they do it. Change it so argument 2 is workspace.Terrain, it should still do exactly the same.
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 05:43 AM
Now the monsters moving, but it's going from 1 point to a second point, around 30 studs away from where it should be.

I'm going to try making it into a repeat until instead of a function.

Soup's on, everybody!
~LuaLearners Writer~
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 05:46 AM
Same effect, here's most of the script

local hit = Workspace:FindPartOnRay(ray)
if hit then
local char
if hit:IsA("Hat") then
char = hit.Parent.Parent
else
char = hit.Parent
if char:findFirstChild("Humanoid") then
enemy = true
wait(math.random(5, 20)/ 10)
monster.Humanoid:MoveTo(char.Torso.Position, char.Torso)
else
enemy = false
wait(math.random(15, 50)/ 10)
repeat
local pos1 = -152.5, 2.6, -68.5
local pos2 = -152.5, 2.4, -51.5
local pos3 = -137.5, 2.6, -68.5
local pos4 = -137.5, 2.8, -51.5
local hum = script.Parent.Humanoid
hum:MoveTo(Vector3.new(pos1), Workspace.Terrain)
wait(3) --Put desired amt. of time
hum:MoveTo(Vector3.new(pos2), Workspace.Terrain)
wait(3) --Again
hum:MoveTo(Vector3.new(pos3), Workspace.Terrain)
wait(3) --Again
hum:MoveTo(Vector3.new(pos4), Workspace.Terrain)
wait(3)
until enemy == true
end
end
end
end
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 06:22 AM
Bring Up My Pickles.

Soup's on, everybody!
~LuaLearners Writer~
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 09:01 AM
Break Up My Pistachios
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
30 May 2013 09:04 AM
The second argument is the part they should walk to.
Setting that should make it work.

Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 09:05 AM
Have a move to loop which goes to part. Have a magnitude check on that part and the humanoids torso when when it is less than say 4 it then moves to the next block.
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 09:33 AM
I'll try Breun's first.

Soup's on, everybody!
~LuaLearners Worker~
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 09:50 AM
It was almost working before I tried Breun's, but it was missing out 2 of the positions. It would go to one, wait 6 seconds, go to 3, wait 6 seconds. Idk why it's doing this.

Soup's on, everybody!
~LuaLearners Writer~
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 10:24 AM
Blue
Units
Measure
Pieces
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
30 May 2013 10:29 AM
Once u issue one MoveTo to a Humanoid. He will walk about ?50? studs toward it, then stop.

So u must continually issue the MoveTo every few seconds...

Take "NPC Wait Animation" from the Catalog. It sounds like it is designed to do exactly what u want to do....

GL,
Brian
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 10:32 AM
I'll see if this works, thanks for the help.

Soup's on, everybody!
~LuaLearners Writer~
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
30 May 2013 10:37 AM
Not excactly, I have the script that makes the monster chase the player it sees, but I need the monster to follow a path of bricks when it isn't chasing a player. Kind of like from Amnesia: The Dark Descent.

Soup's on, everybody!
~LuaLearners Writer~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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