Change Attribute .... Bug?
I feel deep in my heart I got this right. And I swear it has to be a bug.
I have a Ship and 3 Gems
I have a attribute Gems Integer
Ship has these 3 rules
Ship collides with Gem1 change game.Gems to game.Gems+5
Ship collides with Gem2 change game.Gems to game.Gems+10
Ship collides with Gem3 change game.Gems to game.Gems+15
In the Gem actors if they collide with ship... destroy actors.
Now when I start the preview. The actor that is Displaying Text game.Gems will take it upon itself to start adding and subtracting randoms numbers changing the sum. Even when there is no gems around for the ship to collide with.
Plus the +changes are suppose to be in multiples of 5.
Is this a bug?
I have a Ship and 3 Gems
I have a attribute Gems Integer
Ship has these 3 rules
Ship collides with Gem1 change game.Gems to game.Gems+5
Ship collides with Gem2 change game.Gems to game.Gems+10
Ship collides with Gem3 change game.Gems to game.Gems+15
In the Gem actors if they collide with ship... destroy actors.
Now when I start the preview. The actor that is Displaying Text game.Gems will take it upon itself to start adding and subtracting randoms numbers changing the sum. Even when there is no gems around for the ship to collide with.
Plus the +changes are suppose to be in multiples of 5.
Is this a bug?
Answers
the collide rule should be on the gem … not the ship
on the gemActor:
Rule: when overlap or collide with ship
-changeAttribute: game.gems To: game.gems+5 (or 10 or 15 )
-Destroy
change game.Gems to game.Gems+5
for each time you hit.
So not +10 and +15?
The way you did it: first would hit would make +5, then second 5 + 10 = 15, then third hit 15 + 15 = 30.
Do what @motherhoose says but with
changeAttribute: game.gems To: game.gems+5
NOT +10 or +15