I’m having a bit of trouble, and I have the feeling this is either stupidly obvious or rather tricky. I’d like to store the last action that the player asked an npc to do. Basically, I want the player to be able to give a command, have the persuasion fail, but for that NPC to try it later. This is approximately how I’d been trying to do it:
Persuasion rule for asking a person to try doing something:
now the stored command of the person asked is the current action;
say "[The person asked] understood the command.";
persuasion fails.
This compiled, but the stored command doesn’t actually change after giving a command. Is there something I’m doing wrong? Is there another way to achieve this?
It seems to work for me. But the current action inside a persuasion rule is along the lines of “try asking Bob to try taking the ball.” So if you’re looking at the parts of the stored action (rather than just “say [the stored action of Bob]” like I did), it may not appear to change - the action is always “asking”, the noun is always “Bob”, and I’m not sure how you get the internal action - I suspect that requires some knowledge of the I6 internals…
I think you can use Ron Newcomb’s Editable Stored Actions to turn “asking Bob to try taking the ball” to “Bob taking the ball” – change the request part of the stored action to false.
…yep, working in the test case!
[code]Include Editable Stored Actions by Ron Newcomb.
Lab is a room.
A person has a stored action called the stored command.
Bob is a man in Lab.
Persuasion rule:
now the stored command of the person asked is the current action;
say “[The person asked] has understood your command.”;
change the request part of the stored command of the person asked to false;
persuasion fails.
Instead of waiting: try the stored command of Bob.
Instead of an actor singing: say “[The person asked] sings.”
test me with “Bob, sing/z”.[/code]
Okay, that seemed to work, thanks!