Forum rules - please read before posting.

How to use the information from the Equipment download for adding equipment to character

Thanks for answering my other question this one is a bit confusing for me.

I'm using the equipment canvas download to let users choose what accessories to put on the character but im not sure how to know which one they pick. I see only actions to see if there is a specific one in the container or add/remove and to open it. But I want to look at the container and use whatever is in it to put the picked object on my character. Is there a way to do this with AC or is this a scripting thing?

Comments

  • edited February 12

    You might want to rely on scripting to more easily handle the effects of the added-item, but to simply get which item was added you can use the Container / Add event.

    Assuming your Containers are attached to the Player prefab, as with the example, select a Container and add the Event runner component.

    Then, create a new Container / Add event, then click the "+" icon to auto-create a new ActionList asset that runs when fired.

    By default, this ActionList will run whenever a Container has an item added to it. You can limit this to just the Container you're attaching it to, however, by assigning the Container in the event's properties, just above the ActionList field.

    When the ActionList is auto-created, it'll also generate an Inventory Item property, which will be assigned to the item that was added to the Container. As the Container can only hold one at a time, this'll be the item that's currently in the slot.

    The Manual's "Custom events" chapter has more details on AC's Event system.

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.