DE EN FR ES IT CZ

random animation with different costumes

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 12 years ago
    i dont know what CharacterCurrentOutfit will return when you save it into a lua variable.
    on top of the script you could save the current outfit into a variable and check later if its outfit a or b or c or...
    depending on that call the function for that specific outfit. Im pretty new to lua and dont know how to call the data structure stuff out of my head but i think in the wiki is an example after the most data structure names which explain how to grab these.
  2. · 12 years ago
    Please update to the latest build 1182.

    I wrote this ages ago. You should only need a single script. Please try editing the startAnimation lines like so...
    startAnimation( game.CurrentCharacter.CurrentOutfit.CharacterAnimations["useinv_n"] )
    

    -- shorthand code works best in the latest build.
    or you can use longhand code in the build you are using...
    startAnimation("Game.GameCurrentCharacter.CharacterCurrentOutfit.OutfitCharacterAnimations[useinv_n]")
    

    ... either of those should work for returning the animation of the current outfit.

    P.S: you could actually make this script more global by turning it into a function which you could input the animation you want to start. As long as the prefix on the end of the animation names were always the same, i.e: use_n, use_nw, take_n, take_nw, etc, then it would be a much better option than writing a script for each interaction.

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?