Movement restriction

Videogamez Boy
Hello. I tried to make some restriction for character moving to any directions before he completed some task. For example, assume that your character has been tied, and the player is cannot move to anywhere else unless the player can find something to untie. Any idea for that? Thank you.

Silver
Set a flag on the player object like:

player.tied = true


Then on all the things you want to restrict the player from doing run a script:

if (player.tied = true) {
msg ("You can't do this as you're tied up")
}
else { //code it to behave normally
}


I think.

You can do all this in the gui too.

Silver
If it's directions you could also make all the exits invisible and then make them visible when he unties himself.

Videogamez Boy
Hello. Sorry I just read your replies. But thanks for your help.

OurJud
:lol: Acknowledgement of a reply, almost a whole year after it was posted. That must be a record!

XanMag
Maybe Videogamez Boy is a time traveler?

Videogamez Boy
Ops.. Sorry, I just realized there are unread reply from my old thread, and I just want to make a reply. Sorry.. :D

Maybe Videogamez Boy is a time traveler?



:lol: :mrgreen:

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums