Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Game->SetScreenState() doesn't always work

5 replies · 1,246 views · Started 01 March 2010

Test quest

ffc script SetFlags
{
void run()
{
Game->SetScreenState(1, 0x01, ST_DOORUP, true);
Game->SetScreenState(1, 0x01, ST_DOORDOWN, true);
Game->SetScreenState(1, 0x01, ST_DOORLEFT, true);
Game->SetScreenState(1, 0x01, ST_DOORRIGHT, true);
Game->SetScreenState(1, 0x01, ST_SECRET, true);

Game->SetScreenState(2, 0x00, ST_DOORUP, true);
Game->SetScreenState(2, 0x00, ST_DOORDOWN, true);
Game->SetScreenState(2, 0x00, ST_DOORLEFT, true);
Game->SetScreenState(2, 0x00, ST_DOORRIGHT, true);
Game->SetScreenState(2, 0x00, ST_SECRET, true);
}
}

Apparently, the second set simply isn't working. Doesn't seem to like map #2.

many builds ago, i had a similar problem, but it was that it didn't work on screen 00, that might be the problem there?

yeah, that was several builds ago that it didnt work, i think its fixed now, but it was worth a mention :/

OK! The bug seems to be that SetScreenState and GetScreenState count maps from 0 upward instead of 1 upward. (Actually it's always done that, but this isn't consistent with other ZScript commands, not to mention ZQuest itself.)

Worse than that... Seems it was treating maps as being 144 screens instead of 136. Should be good now, though.