Costume change and default pickup animations

  • #1, by andiliddellWednesday, 11. June 2014, 22:38 10 years ago
    Hi all

    Here's my attempt and explaining the problem I'm having, I'm not sure if I'm missing something or its just a naming convention i need:

    Mid way through my game the main player character has a costume change, and I've gone and re-animated all of the walks, idle stands, and talk animations with this new costume.

    Ive also re-animated the bending down and picking up animations of the character, for low middle and high objects.

    The problem I'm having is that if after the costume change, the player wanders back into an area they were in before the costume change and picks something up, the old costume pickup animation plays, as that was the one specified in the original pickup action.

    Does this mean with EVERY object in my game i need to do an IF statement to check whether the costume change has happened and to play the correct bend and pickup animation.

    Things like stand, walk and talk all automatically get selected with a change of costume, is there a way (or a category) you can use to specifiy the default pickup/bend animations, or any way to set this up?

    Hope that makes sense?

    Forum Fan

    178 Posts

  • #2, by afrlmeWednesday, 11. June 2014, 23:18 10 years ago
    You could use the if else queries or you could execute a script like so...
    local anim = getObject("Game.GameCurrentCharacter.CharacterCurrentOutfit.OutfitCharacterAnimations[insert_animation_name_here]")
    startAnimation(anim) -- start the animation

    ...this would automatically get the current character & characters currently selected outfit plus the animation you want it to play. The startAnimation part will play the animation we just linked inside of the anim variable.

    Please note that this method should only really be considered if you were to name the animations exactly the same in each outfit.

    Additionally please note that I have just written this out off the top of my head & thus I can not say 100% whether it is correct or not without actually testing it.

    Also: there are other ways you could go about sorting this out, such as: using tables containing the relevant animation names for each outfit etc, but I won't go into that right now.


    7283 Posts