GameSalad

Howdy, Stranger!

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

A question about attributes, if you'd be so kind as to indulge me.

Good day fellow video game enthusiasts, I have a problem that's likely very simple to fix, however to solution continues to elude me, so I've come to ask the smarter amongst us for help.

Basically, I want to have a score system, an individual level score (that resets at 0 if you replay the level), We'll call this attribute A
and an over-all game score that adds up all the little level scores together. We'll call this attribute B

The problem I face is how exactly do I just add attribute A to attribute B without it changing it to what attribute B is each and every time?

For example, A gets 30 points, so B then gets 30 points.
If A gets 15 more points, I want it to go to 45
but as the minute, it just changes the attribute to 15.

Comments

  • AlchimiaStudiosAlchimiaStudios Posts: 1,005Member, PRO

    @WOLFENSTEIN

    Whenever you update attribute B do the following:

    Change attribute B to attribute B+attribute A.

    Follow us: Twitter - Website

  • WOLFENSTEINWOLFENSTEIN Posts: 61Member, PRO

    I have tried that but it doesn't seem to be working, do I need brackets or something? Or is there a function of adding?

  • WOLFENSTEINWOLFENSTEIN Posts: 61Member, PRO

    I think I got it working, I think the problem was I was changing scene before it could save the attribute, thank you for your help though!

Sign In or Register to comment.