PDA

View Full Version : Detect a Screen Change



C-Dawg
05-13-2008, 11:47 AM
Title says it all.

I think we have the ability to detect when the player changes screens, right? Like, CurrentScreen or something like that?

Gleeok
05-13-2008, 11:52 AM
Well I usually employ the "script restarts on carry over" flag, that way you can reset any amount of variables in the script you want by setting them to load before the loops.

Though int current_screen = Game->GetCurDMapScreen(); should do the trick.

Joe123
05-13-2008, 12:10 PM
The way I usually do it is to set an integer to Game->GetCurScreen();, then check whether that integer's equal to Game->GetCurScreen on the line before setting it again.
Then you know whether it's changed or not.

But Gleeok's method's probably better if you're using ffcs with carryover, I like to use the global script.