edited August 2014 in ORK Support
I have an animated chest. How do I play the open animation when I interact with it and after the animation is finished it displays the content of the chest?

I have already added a box item collector to the chest.
Post edited by Kashrlyyk on
  • You want to open the chest first, and then interact with it again to collect the items (Dark Souls-style) or open it the chest and then just immediately get the items?

    For the latter, just place an additional event on the chest that plays the animation for the chest when you interact with it. That would play the animation when you interact with the chest. However, I'm not sure if there'd be a delay before the item collection dialogue comes up. Might have to experiment with waits to see if they'd have any effect.

    If it's the former just keep the item collector object inside of a chest event prefab that you would make.
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • I think there should be a start delay setting - but maybe that's only for event interactions.
    Anyway, if you want to do more than collecting an item, currently it's best to use the event system.
    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!
  • I tried to get the animation to play when I interact with the chest but nothing happens.
    Event contains the "Search Object" and the "Legacy Animation" step. Event interaction is set to interact and nothing else changed.
  • Why search object - you can use the event object directly as an actor. Use the actor type Object and enable Event Object.
    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!
  • Ok, in the event settings I have now "actor 0 type" set to "object" and checked "Event Object" and in the "animation" step I have: "Object" set to "actor" and "actor" set to "0: Event Object".

    Still doesn't play the animation and now I also have done some stuff and have NOT the tiniest clue what that does. What is an "actor" in the context of an animation? What does the event pick as the "Event Object"? Everything hidden from the user and no error messages. It just doesn't work. So no way to fix it myself because I DON'T KNOW WTF IS WRONG!
  • An actor is a game object that's available to do stuff with, like playing an animation on it. The event object is the game object the event interaction is added to - in your case, that should be the chest.

    I think the problem is that the event doesn't fire because the interaction controller will get the item collector first when trying to interact (if that's been added before that).
    Like I said, best is to do the whole thing as an event and don't use an item collector on the object. So, after playing the animation, display a dialogue and add an item using event steps.
    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 August 2014
    "I think the problem is that the event doesn't fire because the interaction controller will get the item collector first when trying to interact (if that's been added before that)."

    You were right there I deactivated the item collector component and the animation worked but it snaps the camera into a certain orientation. Why is that?

    Then I added a game variable as a "variable condition" to the animation event and set it to valid after the event is done and then I activated the item collector component again and added the condition to check if the game variable from the animation event is set to valid.

    What happens in that case is that the chest is gone! If the item collector is set to "box" there is also no error message.


    I'll do that with the event the second there is a tutorial for it. I have added a "Show Dialogeu" event to the "openChest" event. Obviously setting it to "choice" is not good because it only allows you to take one item.

    Adding a "Add to inventory" step is not what I want and "Add to Itembox" is also not working. Those two were the only ones I considered after searching the event list for "add" and "item". There is no "add item" event step.

    But actually it would be best if setting an opening and closing animation for the "box" object was part of the functionality of the item collector component.

    EDIT: Or an all-inclusive new "item collector" event step could do that too.
    Post edited by Kashrlyyk on
  • If you've enabled Auto Destroy in the variable conditions (inspector, not event) or Deactivate After Event, the object will be gone when the event finishes.

    The event step to add items (and other things) to the inventory is named Add to Inventory.
    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 August 2014
    I want the functionality of the item collector. I assume "Add to Inventory" directly adds the item to my inventory which is NOT what the item collector does. Interacting with an item collector displays a list of items that are inside the item collector box and when I click on an entry THEN it is added to my inventory. That is what I want to do.
    Post edited by Kashrlyyk on
  • Yeah, it directly adds it to the inventory.

    I'll add a new event step to start an item collector and continue the event after the collection - that way you can just use your item collector (or box) and start it from the event.
    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.