Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I'm not completely sure what you want to do.

You'd presumably want to code a response for each object anyway, as he'll presumably want some and not the others .

Is this what you're after? You can nest the match commands like this...

   : match "give _" {
      : match "_ banana" {
         : if (is_carried "banana") {
         : print "You give him the banana.";
         // set appropriate boolean, destroy banana etc.
         : done;}}
      : match "_ box" {
         : if (is_carried "box") {
         : print "He doesn't want that.";
         : done;}}
      : print "You don't have that to give him.";
      : done;}

Obviously you'd need to add extra checks to the code, to check the NPC was there.