I've noticed Rules aren't activating
![shaihalud](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
I've noticed Rules aren't activating if they check for a global attribute to change. I can't remember if this has been an ongoing problem with GS or if it has just happened to me recently.
For example:
=======
Actor A
When attribute "global.dude" = 0
-Spawn actor B
=======
Actor B
Change "global.dude" to 1
When overlaps/collides with whatever
-Change "global.dude" to 0
-.1 Timer, destroy
=======
Using display text it is obvious that "global.dude" is changing, but the Rule within Actor A never activates more than once. However:
=======
Actor A
Constrain "self.dude" to "global.dude"
When attribute "self.dude" = 0
-Spawn actor B
=======
works perfectly. Timers which force the rule to check if the global attribute has changed also work, but then we have to use timers. Shouldn't the Rule already be checking if states change though? It's bloating the code otherwise.
For example:
=======
Actor A
When attribute "global.dude" = 0
-Spawn actor B
=======
Actor B
Change "global.dude" to 1
When overlaps/collides with whatever
-Change "global.dude" to 0
-.1 Timer, destroy
=======
Using display text it is obvious that "global.dude" is changing, but the Rule within Actor A never activates more than once. However:
=======
Actor A
Constrain "self.dude" to "global.dude"
When attribute "self.dude" = 0
-Spawn actor B
=======
works perfectly. Timers which force the rule to check if the global attribute has changed also work, but then we have to use timers. Shouldn't the Rule already be checking if states change though? It's bloating the code otherwise.
Comments
There is only one attribute, the attribute is changing exactly how it should change, but the rule is not activating.
Go ahead and try it yourself, and see what happens. You just need two actors, one global (sorry, "game") attribute, and some way to kill Actor B. It can be fixed using timers or a local attribute, but you shouldn't have to do that.