Weird persistent infinite loop HELP

Member, PRO Posts: 598

I'm having trouble with this weird bug.
Can't seem to get rid of it.
It results in an infinite trigger of this command, unless I restart the scene then it stops.
I've been trying to fix it for the past 4 hours -_-

• Member, PRO Posts: 598

The cell referred to here is a boolean.

• Member, PRO Posts: 598

I finally found what the issue is and learned something significant from it in coding.

It seems I wasn't aware of the priority of the conditions..

To simplify the problem I had

example

when
x=1
y=2

change y to 0
change x to 0
after 1 second change y to 2

this results in the infinite loop despite x is equal to zero

it's a bit confusing but at least I know what the problem is right now.

• Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,947

If that's true then it is a bug. But what you're describing with x and y is potentially different than your original post.

No, a rule with two conditions set to ALL where one condition is no longer true should not fire again.

New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

• Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,947

For example, in this demo the rule only fires once. Is your example different from that?

New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

• Member, PRO Posts: 598

No, a rule with two conditions set to ALL where one condition is no longer true should not fire again

Exactly
That's what I've known all along.
But it seems not to work this time.

I will check out your sample

• Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,947

One way to test your rule is to have a Log Debugging Behavior in that actor inside of a Timer set to every 0.1 seconds or something like that with the tableCellValue(game.ShopTBL,31,8) and then watch the Log Debugger window to see if after you set the value of that table cell to zero, if it changes to any other value or if it's just zero the whole time after.

I would also put a Log Debugging Statement inside the rule you already have (shown above) to make sure that rule is actually firing again as you think it is. Perhaps you've already checked that.

New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

• Member, PRO Posts: 598

I will try to post something to similar to what I had