[I7] Action redirection and the turn tally

It seems the standard action redirection methods have a drawback. In order to demonstrate said drawback, I decided to embrace Madness.

[code]The world is a thing. The world can be safe, in peril, and toast.

The Control Room is a room. “The control room is busy tonight. There are uniformed men all around you, important-looking men in important-looking outfits wearing important-looking expressions. A huge map screen dominates the wall.”

An impressively complex control panel is here. “In the middle of the room you see a control panel. Other than a lot of switches and readouts, it sports a single red button.” It is fixed in place. The red button of DOOM is part of the panel.

Instead of pushing the control panel: try pushing the red button.
Instead of pushing the red button for the first turn:
say “[one of]Alarms blare and blast doors slam shut as you press the red button, provoking a momentary shock throughout the room[or]You hear a single click from the control panel[stopping].”;
if the world was safe, now the world is in peril.
Instead of pushing the red button for the second turn:
say “You press the button again, just to see what happens. Nothing does, although you could swear you felt the earth quiver for a moment.”
Instead of pushing the red button for more than the second turn:
say “Press, press, press. Nothing obvious happens, long as you discount the rapid progression of yellow triangles on the big map.”;
now the world is toast.

Every turn when the world had been not safe: say “Around you, officers and soldiers [one of]start to run[or]are running[stopping] around in a panicked frenzy.”
Every turn when the world is toast:
say “‘You have doomed us all, you fool!’ a bespectacled scientist cries.”;
end the game saying “THE END”.

Test me with “push panel/push panel/push button/push button/push button”.[/code]

My question is, is there a good way to employ “for the second turn” style code and still do action redirection?

Try this.

[code]“Test”

The world is a thing. The world can be safe, in peril, and toast.

The Control Room is a room. The description of the control room is “The control room is busy tonight. There are uniformed men all around you, important-looking men in important-looking outfits wearing important-looking expressions. A huge map screen dominates the wall.”.

An impressively complex control panel is here. The initial appearance of the panel is “In the middle of the room you see a control panel. Other than a lot of switches and readouts, it sports a single red button.”. The panel is fixed in place. The red button of DOOM is part of the panel.

Instead of pushing the control panel: try pushing the red button.

Instead of pushing the red button for the first time:
say “[one of]Alarms blare and blast doors slam shut as you press the red button, provoking a momentary shock throughout the room[or]You hear a single click from the control panel[stopping].”;
if the world was safe, now the world is in peril.

Instead of pushing the red button for the second time:
say “You press the button again, just to see what happens. Nothing does, although you could swear you felt the earth quiver for a moment.”.

Instead of pushing the red button for more than the second time:
say “Press, press, press. Nothing obvious happens, long as you discount the rapid progression of yellow triangles on the big map.”;
now the world is toast.

Every turn when the world had been not safe: say “Around you, officers and soldiers [one of]start to run[or]are running[stopping] around in a panicked frenzy.”
Every turn when the world is toast:
say “‘You have doomed us all, you fool!’ a bespectacled scientist cries.”;
end the game saying “THE END”.

Test me with “push panel/push panel/push button/push button/push button”.[/code]

It seems that the wording is important.

Hope this helps.

I’m afraid not – I worded the scenario badly, but the idea is that one of my projects rely on checking whether the action is the first one (for instance) of consecutive actions, not the first action of its kind in the game. “For the first time” is useful, but doesn’t do this.

Well, from what I gathered it seems that you want pushing the panel to run in the same way as pushing the button does, which means having it go through the instead rules one by one. However, the problem with the first/second/third turn style is that Inform sees the consecutive “push panel” commands as “pushing the panel” then “pushing the button” then “pushing the panel” then “pushing the button” and so on. Therefore, it doen’t actually recognise them as consecutive actions, hence the odd results.

That’s the long and short of it, yeah. I wanted to advertise for a way to change that, to in essence make the redirected-to action be the one that is recorded as occurring.

Inform doesn’t seem to want to cooperate today. I tried creating a timer value, but it doesn’t really enhance clarity. I suppose I’ll have to go the way of stored previous actions; it’s probably the easiest method.