Change Attribute at end of Rules: doesn't wait
gyroscope
I am here.Member, Sous Chef, PRO Posts: 6,598
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
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
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.
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 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 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
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!
---------------------------------------------------------------
Spiral Gyro Games
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
---------------------------------------------------------------
Spiral Gyro Games
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps