Forum rules - please read before posting.

Regarding acton lists. How to do a closeup for a different asset from what I picked?

Hello, I've been trying to do workarounds in my game, where one simple mesh can represent every different item that the character picks up, and once they do so, it shows a closeup of what the item actually is.

I've been testing the tutorial for the Closeup action list, but what it does is essencially switch cameras to put the mesh closer to the view of the player.

I wonder if there is a way to show a new asset, like a png or a sprite, in front of the player view, and then disappear to be later found in the inventory (this one part can be already done with items and hotspots, but I added it for the sake of context).

Comments

  • Welcome to the community, @DradXV.

    There's a couple of ways you can approach something like this:

    One is to rely purely on Menus, which is an option because it sounds like you're looking to display a 2D texture/image.

    If you create a Unity UI-based Menu, and add an Image component to it, you can use the Image to display your intended graphic through animation. Rather than connecting the Image to an AC Graphic element, you can instead attach an Animator to your UI, and create different animations that cause different images to be shown in the Image. Then, when turning the menu on, you just need to use the Object: Animate Action to control this Animator's playback, and in turn which graphic is shown.

    Another way - and this'd be more appropriate if you wanted e.g. a 3D model to be shown - would be to make a prefab out of your intended graphic, and then use the Object: Add or remove Action to spawn the prefab into the scene. If you then follow this up with an Object: Teleport Action, you can have this object be teleported to a Marker that's a child of, and placed in front of, the MainCamera, so that it appears in the Player's view.

  • Thanks a lot! both ideas sound optimal to what I'm lookin for.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.