Hey guys, I've been trying to get step stuff working, but I have no idea how! So far all I know is the walk_rand command ;)
Do you guys know of any previous topics where this has been covered or demoed? Or you could try explaining it to me ;) Thanks guys!
![]() Nov 4 2014, 6:24 pm
|
|
Could you elaborate what you're trying to accomplish?
|
for instance:
mob jim verb Move() src.Step (.north) ??????????????????????????????? Whats the command for this? |
mob Really simple :3 |
there is the walk and the step command, for that you can use
walk(object,direction) this causes the object to move in that direction eg(NORTH EAST NORTHEAST) walk_to(object,target,Distance) this causes an object to follow another object and keep a minimum distance between them and there is step(object,direction) and step_to(objecy,target,Distance) which only take one step You should check out the DM guide there is a section for that with many more procs about movement http://www.byond.com/docs/guide/ eg. var/mob/something=new/mob/man(loc=locate(4,4,1)) this will create a new mob and assign it to a variable named something. mob/verb/FollowMe() walk_to(something,usr) this tells our new mob stored in something to follow the player |
ok, thanks! I'll see if I can find the section on that in the dm guide, but I have looked before and not found anything helpful... Thanks guys ;)
Victorqr, with your first example: walk(object,direction), Would this work? walk(src,North)? Would this, when called, make the mob walk north forever? If so that's awesome! With the (object,target,distance), how do you set a target? What types of targets can you use? Could you use a xyz loc for a target? Or the player? Or even another mob? How does this work? |
Flying1ace wrote:
ok, thanks! I'll see if I can find the section on that in the dm guide, but I have looked before and not found anything helpful... Thanks guys ;) If you check the reference most questions are answered there. |
Go to link I gave you in chapter 14 somewhere in the middle is the movement section. Yes walk(src,NORTH) would work if you use it inside a mob. A target can also be a mob ;)
Now I would suggest that you read the Guide it will help you understand what you are trying to do. mobs have a proc that is named New(). This proc is executed when an object has been created, so in the New() proc add the walk(src,NORTH)command |