Help blocking exits

K.V.
31 Mar 2018, 18:49When entering the room with red border from the north, I'd like the exit to the south to be blocked by the Bunny People, and vice-versa.
What is the best way to check which exit the player just used? Checking the last command (game.pov.currentcommand
)?
mrangel
31 Mar 2018, 19:23game.pov.currentcommandresolvedelements
(objectdictionary, I think) will contain a reference to all objects (including exits) in the last command. So in the case of a "go" command, the key "exit" would give you the exit passed through.
However, I suspect it would be less prone to bugs if you gave the rooms above and below a script (on exit? Or when you enter them?) which sets the location of the bunny people appropriately.
If you frequently want to know which room the player has come from, modify the player object's changedparent
script to save oldvalue
in an attribute somewhere before triggering the various scripts.

K.V.
31 Mar 2018, 20:11I am just "eat up with the dumb-butt" today, as my dear old uncle used to say.
I already have a lastroom
attribute set up, and I didn't even think of it!
Thanks, mrangel!