So remember that the computer is going to go in order through that conditional list and do the first one that is relevant and then stop.
So let's say AL == 100. What happens?
The computer looks at the first conditional and asks, is AL == 100? The answer is yes, so it does that first block. It plays the sound, says "Level 2," AL goe to 0 and Lvl2 becomes Then, then we jump to pub.
So...now we get another 100 AL and check again. What happens?
The computer looks at the first conditional and asks, is AL==100? The answer is yes, so it does that first block. It plays the sound, says "Level 2," AL goe to 0 and Lvl2 becomes Then, then we jump to pub.
We are never going to get to the second conditional because the first conditional is always true.
So you have to rewrite the whole conditional chain.
Try something like this:
Code: Select all
default level = 1
label levelup():
if AL==100:
play sound "jivatma07__level-up-3note2.mp3"
$AL=0
if level == 1:
$level+=1
"Level 2"
elif level == 2:
$level+=1
"Level 3"
else:
"You've reached max level!"
jump pub
else:
jump pub
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe:
http://lemmasoft.renai.us/forums/viewto ... 51&t=21978