GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

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

KIIVIINKIIVIIN Posts: 159Member
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 Posts: 159Member

    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 Posts: 2,782Member, PRO

    @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 Posts: 159Member

    @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 Posts: 143Member, PRO

    Is your timer rule triggered by anything else?

  • KIIVIINKIIVIIN Posts: 159Member

    @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 Posts: 11,845Member, Sous Chef, PRO, Senior Sous-Chef

    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 Posts: 159Member

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