Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Dynamic object names

A topic by Garry Francis created Oct 14, 2019 Views: 96 Replies: 4
Viewing posts 1 to 2
Submitted

I have an object that changes its name during the game as follows.

I have a string defined as follows:

strings {
   bottle_name : string "a bottle";
}

I have an object defined as follows:

objects {
bottle : object "{bottle_name}" start_at = "room01";
}

I have a command defined as follows:

on_command {
   : match "examine bottle" {
      : if (is_present "bottle") {
         : set_string var = "bottle_name" text="a green bottle";
         : print "Upon examination, you see that it's actually a green bottle.";
         : done;
      }
   }
}

So far, so good. It starts out as a bottle, when I examine it, it changes to a green bottle, but when I get it, I get:

"You take bottle_name."

Is this a bug or have I done something wrong?

Submitted

I forgot to mention that it's described correctly in room descriptions and the inventory. The error only occurs when you get or drop the green bottle.

Host

It's a bug, I'll take a look at it.

Host

Just fixed this, should be in the next release (in a day or two).

Submitted

It's fixed in version 1.0.0 Beta 7o. Thank you.