Rule: Change Attribute +Value *Works only occasionally* Help
I have a simple rule within a moving character:
If (self.position.x) is greater than (self.position.custom_x)+20,
Then change attribute (self.position.custom_x) to (self.position.x)
It works! it doesn't work! It starts working at random times! I can't figure out why this doesn't work consistently all the time.
The idea is that I want the game to reset my custom attribute with the current x potion whenever that x position value increases (or decreases) past a threshold.
The only other characters in my scene are a background image and walls, and some basic other rules that don't influence this rule set. Using gamesalad ver 0.10.1 beta for mac OSX. Any suggestions?
If (self.position.x) is greater than (self.position.custom_x)+20,
Then change attribute (self.position.custom_x) to (self.position.x)
It works! it doesn't work! It starts working at random times! I can't figure out why this doesn't work consistently all the time.
The idea is that I want the game to reset my custom attribute with the current x potion whenever that x position value increases (or decreases) past a threshold.
The only other characters in my scene are a background image and walls, and some basic other rules that don't influence this rule set. Using gamesalad ver 0.10.1 beta for mac OSX. Any suggestions?
Comments
So as you suggested, I placed a "change attribute" (self.position.custom_x) to (self.position.x) into the actor at the top of the rules.
Sure enough, so far so good, it has been working from the start now.
So a zero didn't trigger the event for some reason?
Thank you.