Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Inside game_settings{}. The possible values are default and bespoke. The tooltip explains more.

It still renders header with room title and treasure count.

That's correct. treasure_hunt_mode applies to the whole game.

If you use default mode, it automatically determines the end of the game for you and prints the message in the all_treasures_found_win_game system message.

If you use bespoke mode, you have to determine the end of the game yourself. That's what Adventuron was describing. This is where you get the opportunity to clear the screen and remove the status bar.

Reading back through your thread, it looks like you want to clear the screen when the game is over. It's 2:00 a.m. here, so I haven't got time to solve your problem right now, but Adventuron did describe this in the documentation thread (the one that's now locked). He gave you two methods to do this. Can you please try this and get back to me if it doesn't work. Remember that the code he gave you goes into the on_tick{} block. If it doesn't work, post the whole of your on_tick{} block here.

(1 edit)

I've tried as you described. Doesn't work.

on_tick {
   
   : set_integer var = "rnd_tick" {(random(count_descs))} ;
         
   : if (treasure_deposited() == treasure_total()) {
      : clear_screen hide_status_bar = "true" ;
      : print "You remember nothing, just have the feeling that this night was full of fear and adventure.";
      : win_game ;
   }
   
}
 

And the result screen attached. I don't want the red header to be shown. 


AND! If I place "press_any_key" right before the "win_game", it looks as like I expect! But then it shows header and waits for one more key press...

(+1)

It looks like as soon as you print something, the status bar comes back. I'm not sure if this is by design or not. Unless Adventuron has a better solution, I think the best way to overcome your problem is to apply a new theme without a status bar before clearing the screen. Here is a complete game based on the treasure hunt example in the tutorial that does what you want.

start_at = treasure_room
treasure_room = treasure_room
start_theme = two
locations {
   treasure_room : location "The treasure room";
   tomb : location "A tomb";
}
connections {
   from, direction, to = [
      treasure_room, east, tomb,
   ]
}
objects {
   lamp : object "a lamp" at = "tomb" treasure = "true";
}
game_settings {
   treasure_hunt_mode = bespoke
}
on_tick {
   : if (treasure_deposited() == treasure_total()) {
      : set_theme "my_theme";
      : clear_screen;
      : print "You remember nothing. You just have the feeling that this night was full of fear and adventure.";
      : win_game;
   }
}
themes {
   my_theme : theme {
      extends = two
      theme_settings {
         layout = D X O
      }
   }
}

Oh, wow. I didn't know that I can change theme through the game. It's great news, I can implement something that i threw away earlier. Thank you, will give it a try.

I don't think you need to implement a special end game theme just to get rid of the header ...

Just do this :

: clear_screen hide_status_bar = "true" ;
: print "Your message";
: lose_game;