304106
October 29, 2022, 8:36pm
1
Trying to make it possible to hide in a closet in my game
The code is:
Hiding is an action applying to an object.
Understand “hide” as hiding.
in-closet is a truth state that varies.
closet-timer is a number that varies. closet-timer is 0.
Instead of hiding in closet:
say “You quickly dive in the closet.”;
now in-closet is true.
But when I try hiding in closet, it says
hide in closet
I only understood you as far as wanting to hide.
why doesn’t this work
edit: changed it to
There is a closet fixed in place in the Wardrobe.
Hiding is an action applying to an object.
Understand “hide in [something]” as hiding.
in-closet is a truth state that varies.
closet-timer is a number that varies. closet-timer is 0.
Instead of hiding in closet:
say “You quickly dive in the closet.”;
now in-closet is true.
and now it just says
You can’t see any such thing.
Gwen
(Gwen Isilith)
October 29, 2022, 9:05pm
2
Your understand statement needs to include the token of the object you want your action to apply to. So instead of:
Understand "Hide" as hiding.
It should be:
Understand "Hide in [something]" as hiding.
Edit: You will also need to change the name of the action to “Hiding in” if you want to use “Instead of hiding in closet” or change this to “Instead of hiding closet”.
3 Likes
Draconis
(Daniel Stelzer)
October 29, 2022, 9:09pm
3
You also need to include the preposition in the action name if you want to write rules about “hiding in the closet”.
Hiding in is an action applying to one thing.
3 Likes
Zed
(Zed Lopez)
October 29, 2022, 9:38pm
5
Or you might just like to go with
The closet is an openable enterable container in the bedroom.
Understand "hide in [thing]" as entering.
3 Likes
304106
October 29, 2022, 9:39pm
6
tried that, now it just errors