High Score Display - Not working

  • #1, by darren-beckettTuesday, 28. July 2015, 14:57 5 years ago
    Hi,
    I've tried creating the Highscore interface as described here:
    http://wiki.visionaire-tracker.net/wiki/High_Score_Display_(CMS)
    But it doesn't work.
    Log output shows:
    Warning: Can't find object "ani_d2" in table "ActiveAnimations".
    [string "HighScore"]:21: call to setValue on object (eGame,-1) failed

    Has something changed in vs4.2 to make this not work any more?

    Great Poster

    351 Posts


  • #2, by afrlmeTuesday, 28. July 2015, 15:15 5 years ago
    Not sure.

    You created an animation called "ani_d2" & set it as active animation of the object / button you created it on?

    Technically you could create the score without animations too, by using a Value in Visionaire Studio, & a loop containing a display object text or narration text action part which contains the <v=value_name> tag inside of it.

    Check this tutorial out. Ignore the main script part as that's for converting a single value into time format. Focus on the screenshots provided instead & they should give you an idea of what to do. wink

    Imperator

    6842 Posts

  • #3, by darren-beckettTuesday, 28. July 2015, 16:11 5 years ago
    I downloaded the playtime example ved and it does not show the time.

    Great Poster

    351 Posts

  • #4, by afrlmeTuesday, 28. July 2015, 16:25 5 years ago
    You are using the latest version of VS?

    Also... which OS are you using? Windows or Mac?

    Imperator

    6842 Posts

  • #5, by darren-beckettTuesday, 28. July 2015, 16:46 5 years ago
    I'm using WIndows 8.1
    Full version of vs4.2 = Cannot get Highscores to work
    Free version of vs4.1 = Play time does not work

    Great Poster

    351 Posts

  • #6, by afrlmeTuesday, 28. July 2015, 17:07 5 years ago
    You are probably doing something wrong in regards to the high score thing. The playtime counter on the other hand should work (in the ved I provided).

    I'm afraid I can't share the ved I based the high score thing from as I created it as a test in the Zak McKracken 2 ved. It would take me too long to create a dedicated template from scratch & I'm off on vacation to UK the morrow, so don't have much time at the minute.

    Imperator

    6842 Posts

  • #7, by darren-beckettWednesday, 29. July 2015, 14:40 5 years ago
    After some investigation, i found that the button animations have to be on an infinate loop, so that they can be found by the script.

    Great Poster

    351 Posts

  • #8, by darren-beckettFriday, 14. August 2015, 15:31 5 years ago
    How can i resize the interface animations?

    I've tried this (with no affect):
    function setAnimSize(ani, n)
    getObject("ActiveAnimations[" .. ani .. "]"):setValue(VAnimationSize, n)
    end
    setAnimSize("ani_d1", 200)

    Great Poster

    351 Posts

  • #9, by Simon_ASAFriday, 14. August 2015, 16:33 5 years ago
    Your script

    getObject("ActiveAnimations[" .. ani .. "]"):setValue(VAnimationSize, n)

    -- (with "..ani.." = name of your animation, and "n" = % of zoom)
    1
    2
    3
    4


    works well, but only for active animations, and there is no script for inactive animations.
    So you need to use this script. It should work very well on the animation of an interface, but only if the interface is already visible and if the animation is playing.

    Useful tip:

    Afrlme learned me recently that it is possible to add a script on the frames of an animations, which is very useful. So what you can do is use the script above on the first frame of your animation. As a result, everytime that the animation is played (in an interface or not), then the script will be called automatically, and the animation will be resized.

    To add a script on a frame: click on your animation in the list, then click on the first frame, choose the "edit" button for the single frame, and click on the script icon.

    Great Poster

    321 Posts

  • #10, by darren-beckettMonday, 17. August 2015, 15:17 5 years ago
    I added the resize code to the animation frames and it works great.
    Thanks.

    Great Poster

    351 Posts

Write post