Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

You don't need a DONE to prevent the default drop handler from triggering.

Any non masked action that executes will prevent execution of the default handler, including a lowly print.

How ALL statements work ...

When an ALL (or EVERYTHING) noun is detected, on certain verbs (default only works on GET, DROP, PUT, and REMOVE), then Adventuron uses the ALL as a replacement token, and finds all matching items that make sense (GET scans objects in the current room, DROP scans inventory, etc), then it submits multiple sentences to the engine GET ALL in a room with a ROPE and a LAMP and a TRACTOR, would only try to get the ROPE and the LAMP (as they are the only conveyable objects).

Adventuron would then executure two on_command {} loops, and two on_tick{} loops, one for each exploded sentence "GET ROPE" (round 1), and "GET LAMP" (round 2).

Each of those statements would have a default handler ready to run if there is nothing to override the GET statement in the on_command {} block.

Not in my experience. Have you changed something? When I first started with Adventuron, I used to get surprised when I printed a message, then it fell through to the default handler and it printed something extra. As a result, I got into the habit of always using :done; to prevent this happening. (I think Gareth might have pointed this out.) I still rely on handling specific situations within my handler and letting it fall through to the default handler when none of those conditions are met.

Wait  minute. Are you saying that if you've done anything at all other than match or if...else tests, then it stops processing further handlers from that point on? That might make sense. I would have to test it.

(1 edit)

Yes .. to the question raised in your last paragraph. If you do anything "not masked", then it does not run the default handler. If conditions, match conditions and while conditions are naturally masked. Anything inside a : mask {} command are masked too. I think I documented this somewhere.

Ah, here it is:

https://adventuron.io/docs/tut/index3.html#MaskingCommands

Everything is an override by default. You only need to use : done; if you absolutely want to stop processing, but done is quite often not required to stop the system handler for a system command running. Doing a print of set_integer, or set_boolean, or any non passive command is enough to stop the system command handler dead in its tracks.