Can you take a look at this logic?
I have a table, with 26 rows(to store the letters A-Z), or rather integer codes for each letter(A=1, B=2, C=3 etc...). The following logic doesn't seem to be working, and I can't figure out why. Column 6 of the row contains a Boolean value, which signifies whether that row is enabled to the user. Here is the logic.
In gameController actor:
Change attribute: self.randomRowNumber to random(1,26)
Constrain attribute: self.isEnabled to tableCellValue( game.availableWords , self.randomRowNumber ,6)
When ALL conditions are valid: attribute self.isEnabled is false {
Change attribute self.randomRowNumber to random(1,26)
}
To my understanding, when the gameController actor is spawned the game should:
1. Change self.randomRowNumber to 1 through 26
2. Constrain self.isEnabled to True or False, depending on what the 6th cell of the randomRowNumber is
3. If self.Enabled == false, it should reset the randomRowNumber variable and the contrain self.isEnabled should reset as well.
Is the problem that the self.isEnabled == false conditional only runs when the actor is spawned? If so, what is a good alternative/fix? I'm new here, and this is stumping me.
PS, I've made 10x the progress in 1 day using GS, than I have in 6 monthes using Gamemaker Studio. This product is amazing!
-stoney
In gameController actor:
Change attribute: self.randomRowNumber to random(1,26)
Constrain attribute: self.isEnabled to tableCellValue( game.availableWords , self.randomRowNumber ,6)
When ALL conditions are valid: attribute self.isEnabled is false {
Change attribute self.randomRowNumber to random(1,26)
}
To my understanding, when the gameController actor is spawned the game should:
1. Change self.randomRowNumber to 1 through 26
2. Constrain self.isEnabled to True or False, depending on what the 6th cell of the randomRowNumber is
3. If self.Enabled == false, it should reset the randomRowNumber variable and the contrain self.isEnabled should reset as well.
Is the problem that the self.isEnabled == false conditional only runs when the actor is spawned? If so, what is a good alternative/fix? I'm new here, and this is stumping me.
PS, I've made 10x the progress in 1 day using GS, than I have in 6 monthes using Gamemaker Studio. This product is amazing!
-stoney
Comments
Its not that it only runs when the actor is spawned. Its because the rule is telling GS to only check once. In order to get it to do what you want, you will need to wrap the last rule inside of a timer. (You can set the timer to every 0 seconds if you want.)
Welcome to GameSalad. It really is an amazing product!