Global Outfit Animations?

  • #10, by MachtnixMonday, 04. September 2017, 00:43 7 years ago
    Hmm. Somewhere in the wiki I read that you need unique names for Vis objects while using the short adress form. But if you have a clear adress, it could work.

    Is this the long or the short form? I think it works because there is only one possibility and you have only one CurrentOutfit a the same time.
    game.CurrentCharacter.CurrentOutfit.OutfitAnimations["name of animation"]
    I think it's better to clean the animation / outfit cache after using. The engine might think, the current animation is still in the cache.

    Thread Captain

    1097 Posts


  • #11, by afrlmeMonday, 04. September 2017, 01:33 7 years ago
    What I've written falls under direct path linking because we are linking directly to the equipped outfit of the current character.

    You couldn't call something like this with startAnimation...

    startAnimation(Animations["pick_up"])

    Because it's too generic & Animations is the global animation table that contains all of the animations for the game. Whether you use unique names for each & every animation or just some of them depends entirely on each individual game & the features you intend to include in said game. If you want the player to be able to unlock & decide which clothing their character should wear then using the same animation names & Lua script to start the animations would probably be the best solution as you don't need to bother with complex if queries or conditons.

    Imperator

    7278 Posts

  • #12, by MachtnixMonday, 04. September 2017, 03:59 7 years ago
    You are right. It's good for Lua functions. But if you use the player functions only it doesn't matter. I prefer unique names because I don't want to have ten equal "pickups" and to guess what is what wink wink

    Thread Captain

    1097 Posts

  • #13, by ygmantellMonday, 04. September 2017, 04:42 7 years ago
    Yeah, I pretty much want to have unlockable outfits, so instead of having to use a ton of if queries for different outfits, when all I want to do is just play a pick up animation, that lua script works great. Then, for animations that would be specific to each outfit, I would just play them regularly.

    Thank you all!

    Great Poster

    274 Posts