Hi
I couldn't find a solution, but it's a rather simple problem - I'm making a 2d game.
I want to create an object that changes when you use it, before you can pick it up.
the first use interaction should change it's sprite, and the other use interaction would pick it up.
(I don't want that the user would be able to pick it up before the second use interaction)
What is the way to implement it?
Thank you
Yoni
Comments
As @valter points out, the solution can vary a little depending on your chosen Interaction method, but you can control the enabled state of Hotspot interactions by using the Hotspot: Change interaction Action.
If you create two Use interactions, the first to change the object (enabled by default), the second to pick it up (disabled by default), you can use two of these Actions in the first Use interaction to toggle the two interactions so that the second is active after the first is run.
To change the object, you can either have two sprites in the scene and "swap" their visibility using the Object: Visibility Action, or create animations for the sprite so that it changes graphic when e.g. a boolean parameter changes in its Animator controller. That's done on the Unity side of things, but you can then use AC's Object: Animate Action to change the boolean parameter's value as part of the Use interaction to play the animation when desired.