trigger with timer to ad 1 not 2 or 3

LumpAppsLumpApps Member Posts: 2,881
edited November -1 in Working with GS (Mac)
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

Comments

  • old_kipperold_kipper Member Posts: 1,420
    is it a problem with the the event looping at 5 and adding until it hits 3?
  • LumpAppsLumpApps Member Posts: 2,881
    No, I don't think so, because it ads 3 at once, not after 3 loops.
    It actually should do it after each loop because it is a time bonus.
  • LumpAppsLumpApps Member Posts: 2,881
    Aaah! I got it working with the first rule.
    There was something stupid going on somewhere else which made me think it added 3 always but it didn't!

    Hurrrrrraaaaay!
  • old_kipperold_kipper Member Posts: 1,420
    Well done mate. It happens. I was just trying to get it NOT to work.....
  • LumpAppsLumpApps Member Posts: 2,881
    Thanks anyway. I'm pretty excited with this new version of Kung Fu Finger I am working on.
    I'm at the point of balancing the whole game. Not easy I can tell. But fun!!
  • old_kipperold_kipper Member Posts: 1,420
    shout if you need a beta tester.
Sign In or Register to comment.