Okay, fixed the stuck machinery - by adding an action points allowance! The initial round of scene changes work, but as I’m not sure what the “survival” scenes etc are for, I didn’t mess with them. But you could make them a fixed length by noting the turn count, I guess.
Anyway, I’ve added suggestions as comments in the code, so have a look around, mess around with it and see what ideas pop into your head. Above all, have fun!
"rpg scenes" by "Testa"
The arena is a room. "Sand covers the floor, but the bleachers stand empty.[first time][paragraph break]Or you could add extra text here if you like.[only]". [text between "first time" and "only" is only shown the first time the player is in the room.]
Every person has a number called AP. The AP of a person is usually 5.
After doing something:
decrease the AP of the player by 1;
[let the AP of the player be points remaining;]
[I've added some details just to give the player something to do]
Joku is a man in the arena. The player is Joku.
Joku is wearing leather sandals and a metal breastplate.
Sally is a woman in the arena.
Sally is wearing fishscale armor.
Bob is a man in the arena.
Bob is wearing a robe of many colors.
Tokens are in the arena.
Some sand is scenery in the arena.
The bleachers are scenery in the arena.
[When play begins:
now the player is Joku;
now yourself is nowhere;]
[Intro is a scene.][The problem with the Intro scene was that the player had to do something, anything, in order to make the game start. So I've taken it out. If you want to add any scene setting, dialogue or whatever, just add another say statement to when play begins.]
When play begins:
say “This was made with [bold type]No Extensions[roman type], only [italic type]Inform 7[roman type].”;
say "You could put some explanatory text or instructions here.";
now the command prompt is "You are [the printed name of the player] ([the AP of the player] actions remaining) > ";
[When Intro ends:
say “You are standing in the lobby of a building.”.]
[Intro begins when play begins. Intro ends when the time since Intro began is 1 minute.]
FirstPlayer is a recurring scene. FirstPlayer begins when play begins.
[He starts off with one ap extra because the game does an automatic "look" on move one]
When FirstPlayer begins:
Now the player is Joku;
if the turn count is 1:
now the ap of joku is 6;
else:
now the ap of joku is 5;
When FirstPlayer ends:
say “[italic type]Player 2 turn[roman type]”.
[FirstPlayer begins when Intro ends.]
FirstPlayer ends happily when FirstPlayer is happening and location is not Death and the ap of Joku is less than 1.
[FirstPlayer ends happily when the AP of the player is less than 1.]
FirstPlayer ends sadly when FirstPlayer is happening and location is Death and the player does not carry Tokens.
SecondPlayer is a recurring scene.
SecondPlayer begins when FirstPlayer ends happily.
SecondPlayer ends happily when SecondPlayer is happening and location is not Death and the ap of the player is less than 1. [less than 1 is safer than "is 0" because if we start applying different costs to different actions, the player's AP might be say 2, s/he does an action costing 3, and the AP total skips right past zero.]
SecondPlayer ends sadly when SecondPlayer is happening and location is Death and the player does not carry Tokens.
When SecondPlayer begins:
Now the player is Sally;
now the ap of sally is 5;
When SecondPlayer ends:
say “[italic type]Player 3 turn[roman type]”.
ThirdPlayer is a recurring scene.
ThirdPlayer begins when SecondPlayer ends happily.
ThirdPlayer ends happily when ThirdPlayer is happening and location is not Death and the ap of the player is less than 1.
ThirdPlayer ends sadly when ThirdPlayer is happening and location is Death and the player does not carry Tokens.
When ThirdPlayer begins:
Now the player is Bob;
Now the ap of bob is 5;
When ThirdPlayer ends:
say “[italic type]Player 1 turn[roman type]”.
FirstPlayer begins when ThirdPlayer ends happily. [This was the problem line. If you put it right up at the top with the rest of the instructions about the First player, then because it refers to "Third Player" which you haven't told Inform about yet, Inform gets confused.]
[You flip between calling a scene "Survival P1" and "P1Survival". An easy mistake to make in a long coding session, but compilers are notoriously unforgiving. If it was not a mistake, then I urge you to change the name of one or the other so that they are less easily confused with one another.]
P1Survival is a recurring scene.
P1Survival ends happily when P1Survival is happening and location is not Death.
P1Survival ends sadly when P1Survival is happening and location is Death and the player does not carry Tokens.
When P1Survival begins:
Now the player is Joku.
When P1Survival ends:
say “[italic type]Player 3 turn[roman type]”.
[no "P2Survival?]
P3Survival is a recurring scene.
P3Survival begins when SecondPlayer ends sadly.
P3Survival begins when P1Survival ends happily.
P3Survival ends happily when P3Survival is happening and location is not Death.
P3Survival ends sadly when P3Survival is happening and location is Death and the player does not carry Tokens.
When P3Survival begins:
Now the player is Bob.
When P3Survival ends:
say “[italic type]Player 1 turn[roman type]”.
SurvivalP1 is a recurring scene.
[SurvivalP1 begins when SurvivalP2 ends happily.][No such scene declared.]
SurvivalP1 begins when ThirdPlayer ends sadly.
SurvivalP1 ends happily when SurvivalP1 is happening and location is not Death.
SurvivalP1 ends sadly when SurvivalP1 is happening and location is Death and the player does not carry Tokens.
When SurvivalP1 begins:
Now the player is Joku.
When SurvivalP1 ends:
say “[italic type]Player 2 turn[roman type]”.
SurvivalP2 is a recurring scene.
SurvivalP2 begins when SurvivalP1 ends happily.
SurvivalP2 ends happily when SurvivalP2 is happening and location is not Death.
SurvivalP2 ends sadly when SurvivalP2 is happening and location is Death and the player does not carry Tokens.
When SurvivalP2 begins:
Now the player is Bob.
When SurvivalP2 ends:
say “[italic type]Player 1 turn[roman type]”.
SurvivalPL2 is a recurring scene.
SurvivalPL2 begins when FirstPlayer ends sadly.
SurvivalPL2 ends happily when P1Survival is happening and location is not Death.
SurvivalPL2 ends sadly when P1Survival is happening and location is Death and the player does not carry Tokens.
When SurvivalPL2 begins:
Now the player is Joku.
When SurvivalPL2 ends:
say “[italic type]Player 3 turn[roman type]”.
SurvivalPL3 is a recurring scene.
SurvivalPL3 begins when SurvivalPL2 ends happily.
SurvivalPL3 ends happily when SurvivalPL3 is happening and location is not Death.
SurvivalPL3 ends sadly when SurvivalPL3 is happening and location is Death and the player does not carry Tokens.
When SurvivalPL3 begins:
Now the player is Bob.
When SurvivalPL3 ends:
say “[italic type]Player 2 turn[roman type]”.
[Again, these two lines below have to be down here so that the scenes to which they refer have already been declared.]
P1Survival begins when P3Survival ends happily.
SurvivalPL2 begins when SurvivalPL3 ends happily.
P1Alive is a scene.
P1Alive begins when SurvivalP2 ends sadly.
P1Alive begins when P3Survival ends sadly.
P1Alive ends happily when P1Alive is happening and location is not Death.
P1Alive ends sadly when P1Alive is happening and location is Death and the player does not carry Tokens.
When P1Alive begins:
Now the player is Joku.
When P1Alive ends:
say “[italic type]Last surviving team member![roman type]”.
P2Alive is a scene.
P2Alive begins when SurvivalPL3 ends sadly.
P2Alive begins when SurvivalP1 ends sadly.
P2Alive ends happily when P2Alive is happening and location is not Death. [typo corrected]
P2Alive ends sadly when P2Alive is happening and location is Death and the player does not carry Tokens.
When P2Alive begins:
Now the player is Sally.
When P2Alive ends:
say “[italic type]Last surviving team member![roman type]”.
P3Alive is a scene.
P3Alive begins when P1Survival ends sadly.
P3Alive begins when SurvivalPL2 ends sadly.
P3Alive ends happily when P3Alive is happening and location is not Death.
P3Alive ends sadly when P3Alive is happening and location is Death and the player does not carry Tokens.
When P3Alive begins:
Now the player is Bob.
When P3Alive ends:
say “[italic type]Last surviving team member![roman type]”.
Death is a room. [I'm pretty sure this isn't what you meant, unless they're going to be moved here when hp are zero, or something. But this is the only way you can have a location of "Death" in the game.]