trigger with timer to ad 1 not 2 or 3
Hi!
I need an attribute to be increased by 1 when a timer reaches a certain time but only when the attribute is smaller then 3.
Rule:
when attribute timer is 5 and attributex < 3
attributex = attributex +1
This doesn't work because when the attribute is 0 or 1 because it always makes it 3
and I want to make it 1 when it was 0 and 2 when it was 1.
I guess it thinks after adding 1 to 0 it still thinks it is on timer = 5 and adds another 1 and does that again when it added 2. Stupid!
I also tried separate rules:
Rule0
when attribute timer is 5 and attributex = 0
attributex = 1
Rule1
when attribute timer is 5 and attributex = 1
attributex = 2
Rule2
when attribute timer is 5 and attributex = 2
attributex = 3
This does the same thing.
I also tried to put a bolean into it
Rule:
when attribute timer is 5 and attributex < 3 and bolean = 0
attributex = attributex +1
bolean = 1
after1 second bolean = 0
Doesn't work either.
It seems pretty simple and I am pulling my hair out but I just can't get it to work.
Thanks in advance.
Ludwig
I need an attribute to be increased by 1 when a timer reaches a certain time but only when the attribute is smaller then 3.
Rule:
when attribute timer is 5 and attributex < 3
attributex = attributex +1
This doesn't work because when the attribute is 0 or 1 because it always makes it 3
and I want to make it 1 when it was 0 and 2 when it was 1.
I guess it thinks after adding 1 to 0 it still thinks it is on timer = 5 and adds another 1 and does that again when it added 2. Stupid!
I also tried separate rules:
Rule0
when attribute timer is 5 and attributex = 0
attributex = 1
Rule1
when attribute timer is 5 and attributex = 1
attributex = 2
Rule2
when attribute timer is 5 and attributex = 2
attributex = 3
This does the same thing.
I also tried to put a bolean into it
Rule:
when attribute timer is 5 and attributex < 3 and bolean = 0
attributex = attributex +1
bolean = 1
after1 second bolean = 0
Doesn't work either.
It seems pretty simple and I am pulling my hair out but I just can't get it to work.
Thanks in advance.
Ludwig
Comments
It actually should do it after each loop because it is a time bonus.
There was something stupid going on somewhere else which made me think it added 3 always but it didn't!
Hurrrrrraaaaay!
I'm at the point of balancing the whole game. Not easy I can tell. But fun!!