This site requires JavaScript, please enable it in your browser!
Greenfoot back
Jac0bTh0mp50n
Jac0bTh0mp50n wrote ...

2017/8/31

Need Help Level Change

Jac0bTh0mp50n Jac0bTh0mp50n

2017/8/31

#
I am in need of help with changing my levels. I want to make it that when the player reaches a specific score the level will change and will keep changing levels. The issue I am having is that when the player gets the exact score after the level was changed once, it keeps repeating that same level. I hope I explained that well. I have an idea that If(score = # && level = 2) then it will change the level to the next. I know that this is not the correct way to write it but If there is something like that or if there is any other way to do it please tell me. I am really confused.
danpost danpost

2017/8/31

#
Your if statement would be appropriate when coded correctly. Just make sure that those conditions are only checked when the score is changed:
if ( << condition to score >> )
{
    score = score + << score bump value >>;
    if (score == << score to proceed to level 3 >> && level == 2) << start level 3 >>;
}
Jac0bTh0mp50n Jac0bTh0mp50n

2017/9/1

#
thanks danposts so much i will try it out and will get my response
You need to login to post a reply.