But you can’t carry such an animal. You can do this instead:
[code]Jungle is a room.
The monkey is a portable animal in Jungle. [portable doesnt work here]
Instead of taking monkey:
if the player is not carrying monkey
begin;
say “done.”;
move monkey to player;
otherwise;
say “But you’re already carrying this monkey!”;
end if.
test me with “carry monkey/again/drop monkey/carry monkey”[/code]
It might be better to just block the rule that prevents the player from taking the monkey. Then you don’t have to bypass other checks the parser makes (carrying capacity etc).
Procedural rule while taking the monkey:
ignore the can't take other people rule.
Well, for one thing, you mixed up the colon/indent and begin;/end if syntax, but I guess you just typed that in your post rather than pasting it from actual code. As far as “feeding” goes, it’s not a defined action – it’s recognized as a synonym for “giving” which is the actual action. (This can be found in the “actions” index of a compiled game.) Even though the in - game parser recognizes different grammar for actions, when you’re programming the game, you need to use the unique action name. Otherwise it would become impossibly confusing, since often the same syntax can be routed to multiple different actions. Try:Instead of giving fruit to the monkey:
say "The monkey gobbles up the fruit.";
remove fruit from play.Hope that helps.
Edit: Also, since the giving action already requires the player to be carrying the item, you don’t need to add that condition.