PDA

View Full Version : Screen->State[ST_ITEM] && Screen->State[ST_SPECIALITEM]



Sephiroth
10-04-2008, 04:58 PM
I cannot understand how these work, because for some reason, the script I have, (Thanks to Elmensajero on PureZC) will always play the sound, regardless of if the item is there or not.


ffc script gbcompass {
void run(int level, int mode, int sfx) {
bool hascompass = false;
if ((Game->LItems[level]&LI_COMPASS) == LI_COMPASS) {
//If Link has compass, set variable to true
hascompass = true;
}
if (hascompass && mode == 0 && !Screen->State[ST_SPECIALITEM]) {
//If Link has not gotten special item, play sound
Game->PlaySound(sfx);
}
else if(hascompass && mode == 1 && !Screen->State[ST_ITEM]) {
//If Link has not gotten regular item, play sound
Game->PlaySound(sfx);
}
}
}

Now, I know there's an issue with treasure chests and not updating Screen->State[ST_SPECIALITEM] that was just reported and fixed. However, Screen->State[ST_ITEM] doesn't appear to update for me as well, if I was to grab a key that would be just sitting there through the normal item dialog.

What's up with this?

_L_
10-04-2008, 11:34 PM
It's a bug. Please wait until the next build!