levels unlock unlocking 2 levels instead of 1 pls help

chicopchicop Member Posts: 263
edited November -1 in Working with GS (Mac)
im running a iphone 4 software version 4.3.5.

this problem i have did not happen til after the software update and GS update.

I have some script that goes like this:

when all conditions valid:
attribute game.levelwin is true
attribute game.levelsUnlock is less then equal to 2 (currentlevel)

change attribute game.LevelsUnlock to 3

however what happens when i win this level it opens up not just 3 but also level 4

the strange thing is i have this same code on another world (i have 4 worlds with 12 levels each) and it works fine, no problems.

I tried adding a otherwise change attribute game.LevelsUnlock to 3... but the thing is i need to be able to replay the levels however much the player wants to.. and this otherwise rsets all levels to lock that have gone past 3

pls help

thanks

Comments

  • freon1200freon1200 Member Posts: 50
    hey chicop
    i dont know if your problem is similar to what happened to me, tho mine was set up to change attribute of UNLOCK +1 when i beat a lvl, tho i didnt realize that everytime i beat a lvl it would unlock the next one. so if u played the first lvl 60 times in a row the whole game would be unlocked lol. try playing the 1st lvl like 3 times in a row and see if its unlocked to lvl 3. if so i put a rule that stated

    if unlock = (current lvl)
    then unlock +1

    then after u beat it the lvl wouldnt = that anymore and wouldnt add to the unlock.

    hope this helps
  • chicopchicop Member Posts: 263
    ah ok i just started trying the game.levelsunlock+1 and that did not fix it.. when i change it to +4 it opens 4 though.. il give your tip a go see what it gets me. Thanks!!
  • azimpactazimpact Member Posts: 112
    I did mine a little different.

    I used equal to/less than the Next Level to unlock them.

    So, if I finished level one, I set the level number to two and save the attribute upon exiting level one.

    Then in the menu area for level 2, I used the equal to/less than 2 to unlock the next level. Then repeat the process for the next levels only of course using the numbers for those levels. Works great.
  • chicopchicop Member Posts: 263
    neither of these work for me.. its still weird as this only happens from level 3 and up in world 1.. in world 2 i use the same code but everything is fine...

    either im overseeing something or the code is prone to error with the new up date i guess
  • chicopchicop Member Posts: 263
    so if i put

    when all conditions valid:
    attribute game.levelwin is true
    attribute game.levelsUnlock is less then equal to 2 (currentlevel)

    change attribute game.LevelsUnlock to 3

    it opens level 3 AND 4 but if i do

    when all conditions valid:
    attribute game.levelwin is true
    attribute game.levelsUnlock is less then equal to 2 (currentlevel)

    change attribute game.LevelsUnlock to 2

    it opens level 3 only

    is my game corrupt maybe?

    i really can not find anything in level 3 that says levelwin is true other then actually destroying the final character that says levelwin is true on hit

    so odd to me...
  • freon1200freon1200 Member Posts: 50
    hey chicop

    i have had time where game salad wouldnt run right ( or maybe i did something wrong and couldnt find it. there were times when i delete everything i did, or just a line here or there, and redid it, and OFTEN it fixes it.also if it acts weird i sometimes restart the computer and it works fine. tho it sounds like you might have a line somewhere that adds another line to the lvl number. you can also try to put a (display txt) actor with the lvl attrib so you can see EXACTLY when its going to 4. or if its hitting 3, then going to 4. also try copyying EVERYTHING from the actor that works to the one that doesnt, and change according to the lvl.

    those are my suggestions. i hope you get it working soon.
    just make sure you have it backed up, or DONT save it till you know it works XD
  • chicopchicop Member Posts: 263
    cheers for all the help dudes

    i went through step by step re did the code had the text display the commands etc and now it works.

    seems like all weekend i spent time re working things that were already working though, but glad its up and running again.
  • freon1200freon1200 Member Posts: 50
    lol i know the feeling, glad it worked out in the end. =]
Sign In or Register to comment.