PDA

View Full Version : Game->GetScreenState...



Joe123
01-04-2009, 07:19 PM
Surely this:


if(Game->GetScreenState(Game->GetCurMap(),Game->GetCurScreen(),ST_VISITED)) Trace(1);
else Trace(0);

Should always trace '1.000' in allegro.log?
Right?


Well I'm getting 0.000 every time...
Does anyone else know anything about this?
Is it a bug?

pkmnfrk
01-05-2009, 01:29 AM
You would think so, wouldn't you?

Obviously, a bug, though I'm not sure where. Probably in GetScreenState.

To be totally sure, try this script:


//put this in a global script
if(Link->InputL) {
for(int i = 0; i <= 135, i++) {
Trace(i);
if(Game->GetScreenState(Game->GetCurMap(),i,ST_VISITED)) Trace(1); else Trace(0);
}
}

Walk around a bit, then press L. with luck, it should print out the state of each screen on the map (Screen number, Screen state). See if any of them are 1, instead of 0.

Joe123
01-05-2009, 07:29 PM
Hrm, I'll have a look.

_L_
01-06-2009, 08:14 AM
You guys do know that there's a quest rule that automatically outputs screen state changes at the moment they occur?

Joe123
01-06-2009, 02:52 PM
How's that related to this?

pkmnfrk
01-06-2009, 06:57 PM
I assume that the screen state changes are taking place, since the map updates, lock blocks stay unlocked, etc. This is to verify that the scripted interface isn't borked.