Change Attribute - simple question!?
I seem to keep having small problems like this so wonder what I am doing wrong. This is a very simple example that isn't working for me - why?
I have created a text attribute (called direction) and it contains the word UP.
I have an actor and have created 2 rules:
RULE> When actor receives touch & text attribute is UP
Change text attribute to DOWN
RULE> When actor receives touch and text attribute is DOWN
Change text attribute to UP
It doesn't work. If I remove one of the rules it will work - but doesn't with both rules there. Do they somehow conflict - and if so how do i sort it out? I just want to be able to touch the actor to alternate the text attribute between Up and DOWN.
I have created a text attribute (called direction) and it contains the word UP.
I have an actor and have created 2 rules:
RULE> When actor receives touch & text attribute is UP
Change text attribute to DOWN
RULE> When actor receives touch and text attribute is DOWN
Change text attribute to UP
It doesn't work. If I remove one of the rules it will work - but doesn't with both rules there. Do they somehow conflict - and if so how do i sort it out? I just want to be able to touch the actor to alternate the text attribute between Up and DOWN.
Comments
uhm...
try this:
------
RULE> When actor receives touch & text attribute is UP
timer after 0.1 sec
Change text attribute to DOWN
RULE> When actor receives touch and text attribute is DOWN
timer after 0.1 sec
Change text attribute to UP
------
I'm sure there is a better way to solve it, I just like to use this one