I want to prevent the player going in a certain direction while he/she is carrying anything. I've had to implement this as follows:
booleans {
is_carried : boolean "true";
}
on_tick {
: if (num_items_carried() > 0) {
:set_true "is_carried";
}
:else {
:set_false "is_carried";
}
}
barriers {
block_tree_up : block_path {
from = room02
to = room03
block_when = is_carried
message = You'll need both hands to climb the tree, so you'll have to drop your belongings first.
}
block_tree_down : block_path {
from = room03
to = room02
block_when = is_carried
message = You'll need both hands to climb the tree, so you'll have to drop your belongings first.
}
}
This assumes the player uses U or D to climb the tree. I want CLIMB TREE to have the same restrictions. Is there a way to map CLIMB TREE to be equivalent to UP and DOWN?