I modified the Sleep command so that it would move the sleeper to the Dream World, but I felt force moving the actor wasn’t the best programming practice, and I liked the idea of movement to and from the dream world like moving in the real world. So I found a chunk of code online for creating directions, and added a direction ‘Dream’, and that works great.
But here’s the problem.
I want ‘Sleep’ to function like ‘Dream’. Well, okay, there’s an easy place in the definition of dream to define synonyms, but Sleeps already defined, so that doesn’t work, and I don’t know how I can un-define it.
I don’t know how to force actions, so I can’t have Sleep MAKE you Dream (and that still feels clumsy). I can modify Sleep, but I don’t know how to modify it so it becomes a direction.
I’d love to remap (or asAction) Sleep and Dream, but the documentation only talks about it for actions with objects, and a google search doesn’t reveal anything.
I finally had Sleep use gActor.travelWithin(loc) and then gActor.lookAround(), but that feels like a bad solution.
Is there anything I’m missing, or is this really the only way? I’ve only been using TADS for a couple weeks, so I’m scared I’m going to make things a lot harder on myself than I need to because I’m missing some class or method that would make my life much easier.