Star System.....Image Change not working

iTouchGameriTouchGamer Member Posts: 681
edited July 2012 in Working with GS (Mac)
Hey guys, how's it going?

Just ran into this issue in my almost completed game....

In the level lock/unlock box I have a rule that says:

If game.Time1 > 0 && Time1< 8 && game.levelcomplete=1(which means the level is completed) && self.numstars < or equal to 3:

Change Image to box with 3 stars..

This doesn't work for some reason.

Every time I complete the level in less than 8 seconds, the image remains the one with no stars, which is the default.

Thanks guys!

Answers

  • iTouchGameriTouchGamer Member Posts: 681
    I'm not using tables...

    The logic is all there (I think) for some reason it's just not executing.
  • iTouchGameriTouchGamer Member Posts: 681
    edited July 2012
    Anyone??

    I feel like it has something to do with the fact that not all of the things are true. I took away the "round complete" part of the rule, and it works now, but not fully.

    Now this time, let's say I get 3 stars the first time...if I play again and get 1 star, the image changes to star instead of staying at 3.

    Yes, I know what I'm doing, and the logic is correct, all of the correct statements are there.
  • iTouchGameriTouchGamer Member Posts: 681
    edited July 2012
    in your game make sure the rule that changes the stars is set up like this

    if game.currentStars is GREATER then game.level1Stars
    change game.level1stars to game.currentStars



    this way it will not set it to something lower if they belay that level again and not do as well

    cheers

    Yea, I have it like that. I have a self.numstars attribute that changes.

    So for 3 stars I would say change it only if numstars is less than or equal to 3....

    Still not working, so not sure what's wrong. Maybe the way I'm thinking about it is wrong.


    Do they need to be game attributes??
  • iTouchGameriTouchGamer Member Posts: 681
    edited July 2012
    yes they do, because your menu can not read self attributes.

    cheers

    @tshirtbooth The self attributes are in the menu, and the timer is a game attribute...
  • iTouchGameriTouchGamer Member Posts: 681
    Thanks to @JohnPapiomitis for helping me out over Skype, really saved me there!

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    I bet the timer was wrong or you didn't use the floor function in you timer to eliminate the tents and hundredths of a second.
  • iTouchGameriTouchGamer Member Posts: 681
    edited July 2012
    I bet the timer was wrong or you didn't use the floor function in you timer to eliminate the tents and hundredths of a second.
    I bet you're wrong.

    @tshirtbooth was right about the self/game attributes.
Sign In or Register to comment.