This is a repeatable check, I explain "OK button", but repeat for DOWN, RIGHT,
LEFT and UP.
The Commont for variable placed (you may change it).
OK check = 1
DOWN check = 2
RIGHT check = 3
LEFT check = 4
UP check = 5
those numbers are used in the variable, this can be part of 2 ways,
Long way and short way (confused) but I explain both in the spoiler "How Variables are readed"
so you can choose which one you like (optional to check, recommeded for beginners).
When Song Index = 1, we show a picture which is on the far left, when Song Index is 2,
increse the X to +80 (or what fits for your resolution and settings), the Y is the same for
the OK button, so only X is needed. repeat for Song Index 3, 4 ~ 8 (9 stays empty)
9 is basicly max, while variables cannot have more than 9 digits.
On the end, we add Song Index +=1 (so we have song Index 2,
SongIndex = 2 reads the 2nd column of the button, Song Index 3, reads
the 3rd column etc. we also see if the Check Song = ON (self turning switch OFF)
Explained in Spoiler "Check Song" (next part below this image).
Protected download
On the DOWN, we add +2 when SongIndex = 1, +20 when SongIndex = 2 etc,
On RIGHT, we add +3 on SongIndex = 1, +30 when SongIndex = 2 etc,
On LEFT, we add +4 on SongIndex = 1, +40 when SongIndex = 2 etc,
On UP we add +5 on SongIndex =1, +50 when SongIndex is 2 etc,
the higher the SongIndex, the more 0's (zeroes) you add, or 1 less 0.
(depends what's easier, see spoiler "How variables are readed")
Protected download
On the Play Ocarina still, we also check when the "cancel button" is triggered,
if you ask, why is not "escape" checked? (Input.isTriggered('escape') is because
cancel and escape functions in the same way.
we fade out the BGM of the ocarina sounds, 30 wait frames (buffer and important)
without buffer or lower than 20, the menu might open, 30 frames avoid that.
we Enable the Menu Acces back on, and Play Ocarine switch OFF.
after we replay the map BGM again.
the next part of erasing images can be quiet long, erase pic, erase pict2,
erase pict 3, up to all 10, but it is required if you use 1, 3, 6, 10, etc, else
we just erase them in a batch using:
JavaScript:
for (var i = 1; i <= 10; ++i){ //this means, 1 is the picture ID, 10 is the end of Picture ID
$gameScreen.erasePicture(i); // this erase all pictures in a range from 1 through 10.
}
in case you picture ID 41-50, use var i = 41; i <= 50 instead.
than (temp plugin), turn switch OFF to enable player movement again.
else AllowPlayerMovement if you use YEP_StopMapMovement.
Protected download
SongIndex = 1 are the columns like I said before, but if it's confusing somehow,
here is a sample (songIndex 1 is only readed ones, while we increase it by +1.
so here is a sample how SongIndex is readed: which explain the button setting.
Protected download