edited July 2020 in ORK Support
My character has Head and Hair prefabs. This are not armors. Also I have 3 armors for the Head,

Armor 01 can simply use with a viewer prefab.
Armor 02 when using viewer prefab it overlaps Hair. So i have to disable hair prefab visibility.
Armor 03 when using viewer prefab it overlaps whole head. So same thing need to disable hair and head pieces.

Also when unequipped them hair and head have to be visible again. How can I make this work?
Post edited by Malith on
  • Hm, without using scripting I think the easiest solution would be using a game event (e.g. as an Autostart event) on your combatant's prefab that enables/disables the child objects based on the equipped stuff.

    For performace, it'll be best to set up the event to loop instead of using repeating autostart setup (in the event interaction). To loop the event, add a Wait node at the end with a 0 second wait (or e.g. 0.1-0.5, just a small wait time to react in time to equipment changes) and connect it's next slot back to the first node in your event (the one after settings).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2020
    Thank you for the tip :)

    I want to create a looping animation which have 3 animations (Start, Loop, End) I'm using the animation for a Fire Breath ability. When I hold the key I have to play Start animation and then Loop animation till releasing the key. How can I make this work without playing all 3 animations repeatedly when holding the key?

    And is there a way to call an event when entering an Area? Instead of just showing notifications?
    Post edited by Malith on
  • If the loop animation is set up to loop, simply play the start animation (waiting for it to finish), play the loop and create a loop in your event to while the input is still valid (Wait For Input node). Once the input is no longer valid, play the end animation.

    The Wait For Input node's Success slot would connect to a Wait node (e.g. waiting 0 seconds to check again in the next frame), which connects back to the Wait For Input node.
    The node's Failed slot will continue to playing the end animation.


    Since areas in your scene are set up via triggers, just add an Event Interaction with Trigger Enter start type to play your event when entering the area.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.