Disable save on rooms, exept the campfire room.

Kavaz
30 Apr 2022, 12:57

There's a problem: you can save anywhere (by typing SAVE).
But ,i want to disable it in many rooms, exept the campfire rooms.... like roguelike style.
is it possible disable the save command (parser), in some rooms ?
Thank you in advance. :)


mrangel
30 Apr 2022, 14:39

Yes. The save command (like any command) only works if it is either in the current room, or not in a room at all.

So, on the script for entering a campfire room, put:

MoveObjectHere (save)

That prevents the command being used anywhere else, until they visit another campfire room and it gets moved there.

You might also want to create an extra command (named nosave or something) with the pattern save, and make it display a "You can't save here" message. If they're in a campfire room, the real save command takes priority (commands in the room take priority if there's multiple commands with the same pattern); if they're not, the nosave command runs instead.


Kavaz
30 Apr 2022, 16:34

YES !!! thank you !
Change "You can't save here" message, is more complicated ... but OK !
Maybe, in future.....