(solved - stupid question :P) Integer vs Real attribute when it come to adding
KIIVIIN
Member Posts: 159
Hello,
I got an rule that says every 3 seconds att +1 to an real attribute.
But when I display it it adds +2 every 3 seconds. Does that have to do that its real and not integer?
regards.
Comments
Did not make any difference.. I tried. So can someone please explane this to me. Why do my rule add +2 every 3 seconds instead of 1 when its set to +1?
@KIIVIIN it must be your code. Can you link a screenshot?
Or look through your code again, somewhere or somehow it is adding twice.
Integer or real makes no difference in this case.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Its nothing in my code because when I turn the rule off it does not add anything. So I know thats the only code adding.
Its a simple "if attribute is true add +1"
if I would have another one doing the +1 adding it should happen when I have it off right?
I post picture on next answer, because Im pritty sure its nothing else doing it!
Is your timer rule triggered by anything else?
Age of Dominion RTS for iOS
Age of Dominion RTS for Android
No not really, check this picture.
Before it added 3+ all time now its down to +2 i dont know why.
If it's running the rule twice then you have two actors on the scene instead of one. Check the scene layers to see if that's the case. If you still can't solve it, make a blank new scene and add that actor to the scene. This is a way of isolating the problem. Also turn off any other rules in that actor. Then test again.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Im so stupid.. Omg sorry.
I had "spawn actor" when player collide with water so everytime I jumped out of it the actor spawned 2 more times extra.. And the rule was in it.
Been awake to long it seems dammit.
Thank you again man!