I've noticed Rules aren't activating

shaihaludshaihalud Member Posts: 34
edited November -1 in Working with GS (Mac)
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.

Comments

  • creativeappscreativeapps Member Posts: 1,770
    watch debugging tutorial in gamesalad cookbook
  • shaihaludshaihalud Member Posts: 34
    creativeapps said:
    watch debugging tutorial in gamesalad cookbook

    Yeah, I've already said that I am using display text to watch the attribute.
    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.
Sign In or Register to comment.