Inform: Changing the Stat


Sun, 12 Nov 1995 19:18:00 -0500

FU>Hey. I want to have my game change the status line in the game
FU>depending on location. In some locations, it should show the
FU>time, as per STATUSLINE TIME; and in other locations I want
FU>it to show the value of a numeric variable that I define and
FU>update every turn. I looked at the code in the Designers
FU>Manual to do custom statuslines, but how do I switch back and forth?

One way would be to add a variable to the custom statusline routine, and
test it at the beginning. For example:

[ DrawStatusLine i;
#split_window 1; #set_window 1; @set_cursor 1 1; style reverse;
spaces (0->33)-1;
@set_cursor 1 2; PrintShortName(location);
if (i == 0) {
! Code to print time here
};
else {
! Code to print variable here
};
@set_cursor 1 1; style roman; @set_window 0;
];

Joe

* SLMR 2.1a * All wiyht. Rho sritched mg kegtops awound?