Change Attribute at end of Rules: doesn't wait

gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
edited November -1 in Working with GS (Mac)
Hi, for the past two evenings I've been banging my head against a brick wall (well, not literally!). I've a list of Rules, with the beginning conditions valid including: when self.Flipped is false. The Rules are then meant to do its stuff, one Rule at a time, then at the end, I've changed the Flipped attribute to true.

What happens is, it doesn't seem to run through all of the rules, before changing the attribute to True. So the rules only get "half-played" as it were. I've tried placing the setting of the flipped attribute in different places at the end, but it still doesn't do what i want i.e run through the Rules just once and then stop.

It's driving me crazy, I tell you... If anyone can give me some clues, that'd be brilliant. Or I would upload the test if you didn't mind looking at the rules to see what's going wrong, thanks.

:-(

---------------------------------------------------------------
Spiral Gyro Games

""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    I am away from a computer, but are all the rules nested inside the first one?

    So:

    Rule
    when all conditions are valid:
    game.flipped = true
    -----change attribute: game.flipped to false
    -----Rule
    -----Rule
    -----Rule

    Those three rules should execute. But they need to be nested.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi firemaplegames, thanks, your reply is appreciated, but yes, they are all nested in the "When all conditions are valid" Rule. This is what I can't understand...

    Edit: I've just remembered that I have another Actor with the same Rules, except this stops if it's less than, via an integer attribute changed to the Attribute+1. But this doesn't make sense either, it needs to be less than 2, i.e to run through just once, but it needs <3 to run properly. But at least it does what I want it too...but still I'm at a loss really, why it needs run if <3 when it clearly should be <2.

    ---------------------------------------------------------------
    Spiral Gyro Games

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • firemaplegamesfiremaplegames Member Posts: 3,211
    You have two actors with similar rulesets? They might be competing and tripping over each other.

    Also, make sure nothing is hidden in an otherwise section, and flipping it back.

    Figuring this stuff out is one of the joys of game programming. I mean that sincerely. Although it can be frustrating, take solace in the fact that your game is doing EXACTLY what you are telling it to do!
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I will be near a computer again in a few days and can help you out if youre still having problems.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    firemaplegames said:
    You have two actors with similar rulesets? They might be competing and tripping over each other.

    Also, make sure nothing is hidden in an otherwise section, and flipping it back.

    I deleted one of them, and still no joy; I haven't any "otherwise" stuff.
    firemaplegames said:
    Figuring this stuff out is one of the joys of game programming. I mean that sincerely. Although it can be frustrating, take solace in the fact that your game is doing EXACTLY what you are telling it to do!

    It definitely is part of the joy of programming! Except there comes a point when you really can't see anything wrong with what you've asked it to do, no matter how many times you've gone through it...my joy is turning into despair... (ahh, poor me!)

    ---------------------------------------------------------------
    Spiral Gyro Games

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    firemaplegames said:
    I will be near a computer again in a few days and can help you out if youre still having problems.

    Thank you very much, that's really appreciated! So if I haven't cracked it by then, (which I'm almost certain I won't have, being at a loss what else to try) I'll upload the game file. In the meantime, I will keep trying though...

    ---------------------------------------------------------------
    Spiral Gyro Games

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.