Well, since you are now using the Global Value to control level number, you should change that instead. So let's say the "best level" value is 3 and that your events look something like this:
Code:
+ User clicks "+"
- Add 1 to Global Value
+ User clicks "-"
- Sub 1 to Global Value
If you add this event after those two:
Code:
+ Always
- Set Global Value to Min (Global Value, "best level")
The Global Value will always be within the range of 0 to 3. If you change the event to this:
Code:
+ Always
- Set Global Value to Max (1, Min (Global Value, "best level"))
The range will be between 1 and 3.
You can use the mod operator as well. Then you'd probably want to change the code to:
Code:
+ User clicks "+"
- Set Global Value to (Global Value mod "best level") + 1
+ User clicks "-"
+ Set Global Value to Global Value -1
+ Global Value = 0
- Set Global Value to "best level"