Movement restriction

Videogamez Boy
16 Feb 2015, 17:00
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.

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.

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

Videogamez Boy
07 Jan 2016, 17:36
Hello. Sorry I just read your replies. But thanks for your help.

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

Maybe Videogamez Boy is a time traveler?

Videogamez Boy
08 Jan 2016, 16:36
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: