Throwing objects

Does anybody know how I can throw a given object in a direction?

before throwing left snow boot a direction:
	if direction is west:
		say "The boot is so heavy that to conserve your momentum you glide backwards, about halfway to the shore.";
		now boot is in western_end_of_wooded_lake;
		now player is in eastern_end_of_wooded_lake;
		increase score by 1;

I’ve tried a number of different ways to phrase throwing to the west, none seems to work.

The verb “throw” is a synonym for “drop”, so you’ll need to create a new action applying to a thing and a direction, and a corresponding understand rule.

Still can’t get the syntax to work.

I types that from my phone, so I might be slightly off. What do you have and what’s the error?

throwing is an action applying to one thing and one direction.  understand "throw [thing] to the [direction]" as throwing.

instead of throwing left snow boot:
	if direction is west:
		say "The boot is so heavy that to conserve your momentum you glide backwards, about halfway to the shore.";
		now  left snow boot is in western_end_of_wooded_lake;
		now player is in eastern_end_of_wooded_lake;
		increase score by 1;
		stop the action.

Error:  You wrote 'throwing is an action applying to one thing and one direction" but an action can only apply  to things or to kinds of value, for instance:  'photographing is an action applying to one visible thing'.

Sorry. It should be:

Throwing is an action applying to one thing and one object. 
Understand "throw [something] to the [direction]" as throwing.
1 Like

Another option, (I know OP is wanting to throw something in a direction, but in general if you want to contextualize messages based on object and location) is to use existing grammar that will kick in only when a specific rule applies.

[Assuming "Outdoors" is a region]

After dropping the baseball when the location is in Outdoors:
    say "You give the baseball a gentle experimental toss so you don't have to chase it too far and it thumps to the ground. You probably could have been in the big leagues!"

After dropping the baseball when the location is Pitcher's Mound:
   say "You hurl the ball with a wicked curve that thumps satisfyingly into the catcher's mitt. Stee-rike! The catcher rolls the ball back in case you'd like to throw it again."
3 Likes

On another note, the game reacts as though I am always throwing the right or left boot to the west.

instead throwing left snow boot:
	if direction is west:
		if player is in Wooded_lake:
			say "The boot is so heavy that to conserve your momentum you glide backwards to the east.";
			now  left snow boot is in western_end_of_wooded_lake;
			now player is in eastern_end_of_wooded_lake;
			increase score by 1;
			stop the action;
		if player is in eastern_end_of_wooded_lake:
			say "Your momentum is enough to carry you to the eastern shore of the lake";
			now left snow boot is in wooded_lake;
			now player is in eastern_exit;
			increase score by 1;
			stop the action;
		if player is in western_end_of_wooded_lake:
			say "Your momentum is enough to carry you back to the center of the lake";
			now left boot is in western_exit;
			now player is in Wooded_lake;
			stop the action;
	if direction is east:
		if player is in Wooded_lake:
			say "The boot is so heavy that to conserve your momentum you glide backwards to the west.";
			now left snow boot is in eastern_end_of_wooded_lake;
			now player is in western_end_of_wooded_lake;
			increase score by 1;
			stop the action;
		if player is in western_end_of_wooded_lake:
			say "Your momentum is enough to carry you to the eastern shore of the lake";
			now left snow boot is in Wooded_Lake;
			now player is in western_exit;
			increase score by 1;
			stop the action;
		if player is in eastern_end_of_wooded_lake:
			now left snow boot is in eastern_exit;
			now player is in Wooded_lake;
			say "Your momentum is enough to carry you back to the center of the lake";
			stop the action;

but if I throw to the west and then to the east I should end up back in the center of the lake.  But the parser reacts as though I throw it to the west twice (no matter which direction I throw the left and right boot in.

“Direction” is a type of thing, so you’re basically asking “if a direction is west”, which it is.

The direction the player actually used in the command is “the second noun”. (The first noun, aka “the noun”, is the thing they’re throwing, since that’s the first object specified in the command.)