how to test an attribute after a list of instructions
stefdelec
Member, PRO Posts: 146
Hi,
I would like to test if an attribute is empty/null or not after a list of instructions.
Attribute.A => list of instruction. After list of instruction if this attribute is empty=> change attribute to 23!
How can I do that?
Comments
Use a Display Text behaviour to monitor the attribute.
Yes but I want the attribute to be test only after all the instructions have been executed. Am I clear? ;-/
I'm 100% sure what you mean, 'after a list of instructions' is a little vague, I'm guessing it's a series of rules ?
Yep.
Change attribute 1=> random(-1;1)
Change attribute 2=> random(-1;1)
Rule => if all attribute 1 and 2 = 0 =>the reshuffle.
(Writing this, I am thinking a "loop" could be a good way! :-) )
Could you not simply place the rule that checks for parity after the two change attribute behaviours in a timer (after 0 seconds) forcing it onto the next cycle of code ? I think that should work (if I understand the question properly) ?
Hum. I could, but I ve read that 'timer behaviour' are heavy.
I did:
Loop while all conditions are valid
attribute A = 0
attribute B = 0
change attribute A = random(-1,1)
change attribute B = random(-1,1)
Not 'After' timers as they only run once, mostly when people refer to timers being processor intensive they are referring to 'Every' timers.
Great! Thanks!