A non-player trying a stored action = boom

I have a subclass of person called “robot”. Each robot has a stored action called the “current-command”. I have a loop declared as follows: repeat with robbie running through robots: In that loop, I have the following line: try robbie trying the current-command of robbie; That line gives me an error. When I removed the “robbie trying” part, it worked fine (the player tries the current-command of robbie), leading me to believe that the problem is that I’m having a person besides the player try a stored action. Any way around this? This particular feature is crucial to the game.

On the face of it, this sounds like a bug in the way Inform is parsing “current-command of robbie”. (You should report it!) There is no limitation on who can try a stored action.

On to solving the problem: What error do you get?

When you remove the “of Robbie” in that loop, does each robot do its own thing, or do they all do the player’s stored action (assuming the player is also a robot) ? There are situations where Inform can correctly infer the object of a property without an explicit “of object”, and maybe the code will just work without the “of robbie”…



Problem. You wrote 'try robbie trying the current-command of robbie': but this is not an action I recognise, or else is malformed in a way I can't see how to sort out.

I actually tried that and still got the error.

The player is not a robot, by the way. He’s human, and as such does not have a stored-action.

EDIT: I tried creating an action “executing the command”, which says “try the current-action of the lolbot” in its carry out rule. (The lolbot is a robot that varies, and is set to robbie at the start of the loop.) It compiles, but apparently robbie doesn’t actually do anything when that action is run. I even tried manually telling a robot to execute the command (by giving it an understand and using a persuasion rule so other people always do what I say) - and nothing. If, however, I have the player-character execute the command, then it works fine.

EDIT2: Just to clarify, “robbie” is just a temporary value, not an actual robot. There is, however, an actual robot (dubbed the Testbot) in the same room as the player.

I take back what I said about this being a bug, then. You said that you had tried the same syntax, minus “of robbie”, with the player and it worked, so that’s what I was going off of… Anyway, please don’t report it!

The real problem is that the actor is already included in the stored action and so it’s redundant to say “try the actor trying [stored action]”. Here’s the code you need:

try the current-command of robbie.

Inform knows which actor to try because the actor is automatically supplied when you make the stored action a property of an actor.


Now nothing whatsoever happens. I just realized a possible error elsewhere in the code, though, which I’m going to look into. Will get back to you.

Is the action you want the robot to do defined using the “carry out an actor jumping” syntax? It needs to be, or you probably won’t get any output.


Well, I changed around some stuff, and now something happens. Oddly enough, the player, not the robot, carries out the action. One possibility is that you were wrong, but another is that it has to do with the way I assigned the current-command of robbie: The player types a particular command, then the action the robot should do, with this action being directly assigned to the robot’s current-command. That would cause problems, wouldn’t it?

EDIT: In response to your above post: I’ve just been using the standard verbs for testing, such as jumping and going.

Oops, this is incorrect. To specify an actor other than the player, you need to define the stored action like so:

The current-command of Death Bot is the action of Death Bot trying jumping.


Check the Standard Rules extension (author=Graham Nelson) for your testing actions to see if they are defined properly. I know going is defined with “carry out an actor going”, but jumping probably is not. For most actions (again, not going), you’ll need customized report actions to see any output. But you can use the ACTIONS testing command to see who tries what action regardless of whether the command actually prints any output.


You misunderstood me, but that doesn’t matter. I got it working, thanks in large part to your help. What I needed to do was just use “try the current-command of robbie” like you suggested, but I also needed to change the actor part of the current-command of robbie to robbie first (using an extension).