getting overall score from different values

MarcoColMarcoCol Member, PRO Posts: 279
Hi,

i want to get a final result of the past level by adding some attributes to one score.
So I have for example:
- the rest time on my clock (not the internal clock)
- left lifes (per each life 100 points; so I change the attribute to "lives"+100)
- and later a bonus four finding hidden objects.
So I show each single attribute, and the points there are right.

So then in the level overview I want to change the attribute "Level1CompleteScore" to "Level-Time"+"lives"+"bons".
But each time I got the result "0" ?!

Where is my error?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited November 2012

    @MarcoCol

    Hi Marco, first to say, your line: - left lifes (per each life 100 points; so I change the attribute to "lives"+100)

    Then shouldn't that be change Attribute lives to lives*100 ? And if it is, you don't need a separate behaviour for this as it can be put in the final change attribute.

    As for this final change attribute, I assume the quote marks are just for clarity sake and you're not typing the attributes in the expression editor as well as using the quote marks...

    I'm sure you're not, so then a possibility is the hyphen in Level-Time, it might not like hyphens....

    So try: Change Attribute Level1CompleteScore to LevelTime + (lives*100) + bonus

    see if that works for you.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • MarcoColMarcoCol Member, PRO Posts: 279
    Hi Gyroscope,

    yes, right. I don't type in the attibutes. I choose them. So finally they are without the quote-marks.

    Well, I put the calculation of the live-bonus in the view of the live-point-bonus. Down under all single values, there will be then the sum of all of them. And I still got 0!

    I use for the sum:
    change attribute (Level1CompleteScore) TO (LevelTime)+(Life-Points)+(Bonus)
    In my test, LevelTime was "42" and Life-Points was "300" (for 3 left lifes).
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited November 2012

    OK, I was going to make a couple of suggestions: double-check that your attributes are all integers. And put three more temporary actors on-screen, each with Display Text, one showing LevelTime, one LifePoints and one Bonus, to check that these values are coming in individually correctly. But by the sound of it you've done this...

    Could you take a screenshot of your Rule? Might shed more light on what's going on....

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • MarcoColMarcoCol Member, PRO Posts: 279
    Hi,

    oh I see my mistake. I wanted to change the attribute (CompleteScore) to (ScoreLvl1), after the calculation, and I must do this the other way around:
    change attribute (ScoreLvl1) to (CompleteScore)...

    Thank you.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Glad it worked out for you. :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.