Hi folks,
I was just trying this and have got a little stuck. Thanks for any tips. So far, I’ve set up a basic machine with a joystick and tried to implement a new verb. However, I’m having issues with the reading of the [direction] which seems to fire on the first conditional block whether it’s west etc or not in the command - I think that I might need a temporary variable to store the direction from the action, but can’t get this going. Thanks in advance!
> "Teleporting test" by Mr B
Section 1 - Places
Lab is a room. East Place is east of Lab. Easterly Point is east of East Place.
West Place is west of Lab. Westerly Point is west of West Place.
North Place is north of Lab. Northerly Point is north of North Place.
South Place is south of Lab. Southerly Point is south of South Place.
Section 2 - Teleporter
The Teleporter is in Lab. A joystick is part of the Teleporter. A screen is part of the Teleporter. The red button is part of the Teleporter.
The target-place is a room which varies. The target-place is Lab.
Every turn: say "[target-place]."
Instead of pushing the red button: now player is in target-place.
Section 3 - Moving it to
Understand nothing as pushing it to.
Moving it to is an action applying to one thing and one visible thing.
Understand "move [something] [direction]" as moving it to.
Check moving it to:
if noun is not the joystick:
instead say "This verb is just for the joystick."
Carry out moving it to:
if direction is west:
now the target-place is the room west of the target-place;
else if direction is east:
now the target-place is the room east of the target-place.
Report moving it to:
say "You move joystick to [target-place] on the map."
test me with "move joystick east"
[For later... thinking about how to let player use UP / DOWN / LEFT / RIGHT with the joystick...
Left is a direction. Right is a direction. The opposite of left is right. Index map with left mapped as west.]
Okay - ignore above if you’re looking for first time - I think that I’ve improved this a bit.
Am I on the right lines? Creating a variable called selected-direction and storing that to go into the new action…
What other bugs might I be creating here? Thanks for looking…
PS Just bolted down the teleporter in the Lab for the moment too!
"Teleporting test" by Mr B
Section 1 - Places
Lab is a room. East Place is east of Lab. Easterly Point is east of East Place.
West Place is west of Lab. Westerly Point is west of West Place.
North Place is north of Lab. Northerly Point is north of North Place.
South Place is south of Lab. Southerly Point is south of South Place.
Section 2 - Teleporter
The Teleporter is fixed in place in Lab. A joystick is part of the Teleporter. A screen is part of the Teleporter. The red button is part of the Teleporter.
The target-place is a room which varies. The target-place is Lab.
Every turn: say "[target-place] / [selected-direction]."
Instead of pushing the red button: now player is in target-place.
Section 3 - Moving it to
Understand nothing as pushing it to.
Moving it to is an action applying to one thing and one visible thing.
Understand "move [something] [direction]" as moving it to.
Selected-direction is a direction which varies. Selected-direction is north.
A direction can be orthogonal. North, south, east and west are orthogonal.
Check moving it to:
if noun is not the joystick:
instead say "This verb is just for the joystick.";
if second noun is not orthogonal:
instead say "You have to move the joystick in a compass direction."
Carry out moving it to:
now selected-direction is second noun;
if selected-direction is west:
now the target-place is the room west of the target-place;
else if selected-direction is east:
now the target-place is the room east of the target-place;
else if selected-direction is north:
now the target-place is the room north of the target-place;
else if selected-direction is south:
now the target-place is the room south of the target-place.
Report moving it to:
say "You move joystick to [target-place] on the map."
test me with "move joystick east"
[Left is a direction. Right is a direction. The opposite of left is right. Index map with left mapped as west.]
Sorry - me again - this is a bit more elegant than the above for the carry out rule:
Carry out moving it to:
now selected-direction is second noun;
now the target-place is the room selected-direction of the target-place.
But still wondering about possible bugs and how to perhaps use up / down with the joystick…
For my joystick I used toward (the person) as down and away (from the person) as up. I haven’t seen feedback from the playtesters about this. I have a poster by the joystick (in my game the joystick moves a large telescope) that shows people how to use the joystick i.e. the semantics of the command.
Don’t know if this helps. I was able to do it without a stored variable. Let me know if my code would help.
1 Like