Im trying to make a code that makes a verb so that the person follow the person of his choice in veiw.
here is my code it doesnt work:
mob
verb
follow
usr.M follows user of choice by 4 tiles
ID:175387
Apr 28 2003, 11:53 am
|
|
In response to Unknown Person
|
|
i think you could use walk_to instead, and then you wouldnt' need a following var, as you would continuously do it until you pressed another dir key
|
Lets make the follow verb
mob //mobile object
var/following = 0 // a new mob variable called following, we will need this to stop folling later
verb/Follow(mob/M in view(4)) // you can use this verb on a mob from 4 tiles away
switch(alert(M,"Do you want [src] to follow you?","Follow","Yes","No")) // asks M if you want him to let you follow him/her
if("No")
src << "[M] doesnt want you to follow him/her"
return // if no, it stops the verb
src.following = 1 // then because it was stopped, you dont need the if("Yes") now the variable "following" is true
while(src.following) // while your following variable is 1 or TRUE
step_towards(src,M) // step towards the person youw ant to follow
sleep(2) // this refreshes every 2/10 seconds
verb/StopFollowing() // a new verb named stopfollowing
src.following = 0 // your following goes to 0 and the while(src.following) loop stops
src << "You stop following a person." // tells you
****
When you say any word constantly, it will sound like a chimpanzee talking gibberish
~~Dragon Lord~~