So I'm trying to make a map (shown in rough below) where you can move between different places of interest, and according to the situation, certain events can happen. I was trying to do it with events, thinking of everyplace as a variable and allowing the up and down arrows to increase the value of the variable, then putting something to make the counter go back to zero if it gets over the number of places. Then I have a "cursor" located according to the value of the variable, and if the button A is pressed, it should ask if one wants to go to that location. Except, it doesn't work, probably because I'm putting the loop in the wrong place of giving priority to the wrong conditional. Anyone have tried something similar or have any idea how to do it?
After some attempts, I managed to make it work somehow, but it moves a bit slowly, maybe I'm still doing something wrong. I got it by using two pages of the common events: (with the wait in 10 frames it seems to work fine)
1) Mapa1:
◆Show Picture:#1, map city, Upper Left (0,0), (100%,100%), 255, Normal
◆Loop
◆Wait:30 frames
◆If:Lugares = 1
◆Show Picture:#2, cursor, Center (255,0), (100%,100%), 255, Normal
◆Common Event:Mapa2
◆Break Loop
◆
:Else
◆If:Lugares = 2
◆Show Picture:#2, cursor, Center (255,255), (100%,100%), 255, Normal
◆Common Event:Mapa2
◆Break Loop
◆
:Else
◆If:Lugares = 3
◆Show Picture:#2, cursor, Center (0,255), (100%,100%), 255, Normal
◆Common Event:Mapa2
◆Break Loop
◆
:Else
◆If:Lugares > 3
◆Control Variables:#0001 Lugares = 1
◆
:Else
◆If:Lugares < 1
◆Control Variables:#0001 Lugares = 3
◆
:End
◆
:End
◆
:End
◆
:End
◆
:End
◆
:Repeat Above
2) Mapa2:
◆Loop
◆If:Button [Up] is pressed down
◆Control Variables:#0001 Lugares += 1
◆Common Event:Mapa1
◆
:Else
◆If:Button [Down] is pressed down
◆Control Variables:#0001 Lugares -= 1
◆Common Event:Mapa1
◆
:Else
◆If:Button [OK] is pressed down
◆If:Lugares = 1
◆Text:None, Window, Bottom
: :Transport to place 1
◆Common Event:Mapa1
◆
:Else
◆If:Lugares = 2
◆Text:None, Window, Bottom
: :Transport to place 2
◆Common Event:Mapa1
◆
:Else
◆If:Lugares = 3
◆Text:None, Window, Bottom
: :Transport to place 3
◆Common Event:Mapa1
◆
:Else
◆
:End
◆
:End
◆
:End
◆
:End
◆
:End
◆
:End
◆
:Repeat Above
After some attempts, I managed to make it work somehow, but it moves a bit slowly, maybe I'm still doing something wrong. I got it by using two pages of the common events: (with the wait in 10 frames it seems to work fine)
1) Mapa1:
◆Show Picture:#1, map city, Upper Left (0,0), (100%,100%), 255, Normal
◆Loop
◆Wait:30 frames
◆If:Lugares = 1
◆Show Picture:#2, cursor, Center (255,0), (100%,100%), 255, Normal
◆Common Event:Mapa2
◆Break Loop
◆
:Else
◆If:Lugares = 2
◆Show Picture:#2, cursor, Center (255,255), (100%,100%), 255, Normal
◆Common Event:Mapa2
◆Break Loop
◆
:Else
◆If:Lugares = 3
◆Show Picture:#2, cursor, Center (0,255), (100%,100%), 255, Normal
◆Common Event:Mapa2
◆Break Loop
◆
:Else
◆If:Lugares > 3
◆Control Variables:#0001 Lugares = 1
◆
:Else
◆If:Lugares < 1
◆Control Variables:#0001 Lugares = 3
◆
:End
◆
:End
◆
:End
◆
:End
◆
:End
◆
:Repeat Above
2) Mapa2:
◆Loop
◆If:Button [Up] is pressed down
◆Control Variables:#0001 Lugares += 1
◆Common Event:Mapa1
◆
:Else
◆If:Button [Down] is pressed down
◆Control Variables:#0001 Lugares -= 1
◆Common Event:Mapa1
◆
:Else
◆If:Button [OK] is pressed down
◆If:Lugares = 1
◆Text:None, Window, Bottom
: :Transport to place 1
◆Common Event:Mapa1
◆
:Else
◆If:Lugares = 2
◆Text:None, Window, Bottom
: :Transport to place 2
◆Common Event:Mapa1
◆
:Else
◆If:Lugares = 3
◆Text:None, Window, Bottom
: :Transport to place 3
◆Common Event:Mapa1
◆
:Else
◆
:End
◆
:End
◆
:End
◆
:End
◆
:End
◆
:End
◆
:Repeat Above
