Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Question about the code skeleton

A topic by electrotrains created Apr 14, 2021 Views: 193 Replies: 2
Viewing posts 1 to 3
Submitted(+1)

Hi all,

Thanks for setting up the game jam! I'm introducing my 11 year old son to text adventures with Zork, and enjoying exploring and making a map.

Anyway, we thought we might have a go at entering the jam.

As a relative newcomer to Inform and PunyInform (i.e. yesterday), I'm a bit confused by this bit of the code skeleton, and why it doesn't have a verb listed:

        after [;

            if(Note hasnt moved) {

                give Note moved;

                "The note falls to the floor as you pull out the knife.";

            }

        ];

Why isn't like this instead:

        after [;            Take: ....... ];

I couldn't find anything in the Inform 6 or PunyInform library documentation that explained what happened without a verb, and why this doesn't cause the text to be printed e.g. for examine.

Hope you don't mind a beginner question!

Robin

HostSubmitted

Welcome to the jam Robin and son!

You are absolutely right of course. It should say "Take:". My bad.

It is legal, and sometimes useful, to write code in an after routine without preceding it with an action name. That code will then be run regardless of the current action. This was not the intention here though.

/Fredrik


HostSubmitted(+1)

I have now fixed this in the code skeleton.