(solved - stupid question :P) Integer vs Real attribute when it come to adding

KIIVIINKIIVIIN Member Posts: 159
edited January 2016 in Working with GS (PC)

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

  • KIIVIINKIIVIIN Member Posts: 159

    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? :/

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @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.

  • KIIVIINKIIVIIN Member Posts: 159

    @Hopscotch said:
    @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.

    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!

  • JScottJScott Member Posts: 143

    Is your timer rule triggered by anything else?

  • KIIVIINKIIVIIN Member Posts: 159

    @JScott said:
    Is your timer rule triggered by anything else?

    No not really, check this picture.
    Before it added 3+ all time now its down to +2 i dont know why.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    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

  • KIIVIINKIIVIIN Member Posts: 159

    @tatiang said:
    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.

    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! :neutral:

Sign In or Register to comment.