Hey all. I'm currently trying to set-up the following flow:
Inventory items that, when collected, appear in a specific menu and can trigger an ActionList. These will be items that, when selected in a menu, will play an animation + a track (song).
I've setup mostly everything, but I can't figure out how to make these inventory items appear in this menu. I cloned the "Objectives" menu, and I've rearranged things as I'd like them. I've set up descriptions and textures. Now I need these items to appear as the objectives do, to display text at the bottom (band history) and display a texture up top/right, and, as mentioned before, when clicked, to trigger an individual ActionList/Per item. Here's an image of how it's set up currently.
https://drive.google.com/file/d/1hHFAAHsb0AfJvKYqwzzH3Cc2J5lthwRA/view?usp=sharing
As always, thank you very much for your help.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Are these items separate from your "regular" Inventory? If so, you can use Categories to filter their display between Menus.
In the Inventory Menu's "Categories" tab, define two Categories - Default and Music Track (or whatever best describes the item type). Then in the "Items" tab, place each item in the correct Category.
Set the InventoryBox element's Inventory box type property to Default, and then check Filter by category? to have it only display items in the "Music Track" category. You can do the same to your "regular" Inventory to prevent such items showing there.
To change the label/texture of an item in the Menu, you can use the Menu: Update content Action. If you pass an Inventory item parameter to this Action, it can be used to set a Label element's text to that item's name, and a Graphic element's texture to that item's texture.
Create a new ActionList asset with two instances of Action type that affect the Label and Graphic elements. Define an Inventory Item parameter, and use it to override each of them.
Then, for each item, define a "Use" interaction asset, and use the ActionList: Run Action to run the above asset, setting the Inventory item parameter to the item that is being used.
Hi. thank you for replying so quickly. I followed your instructions up to the filter by category. But, I believe I'm having a senior moment.
Where do I need to "Create a new ActionList asset with two instances". Where does this action list go? In the "Menu Proprieties" on "Actionlist when turn on"?
Same question but for "Menu: Update content", does that one go in the "Menu Proprieties" on "Actionlist when turn on"?
thank you in advance
I was able to make the items appear in the costum menu (still having issues figuring out how to make text/texture appear as they did for the objective example). I also had an additional question. Is it possible to change "Category" in an ActionList?
The flow for the vinyl Records/Tracks is going to be: Collect -> Take from Standard Inventory -> Drag into Custom Inventory (which is going to be a record player) -> Remove from Standard Inventory -> Retain in Custom Inventory.
If the above is not possible, then it's fine, I can just send them directly to the custom one and forgo the entire flow. I was just curious if it was possible.
Also, for the "Menu: Update content Action" question, if anybody has a tutorial or link to a thread that alreayd covered this, please let me know, and I'll follow that.
Thank you.
I've been working with the inventory quite a bit recently, and here are few things worth experimenting with that may help in the above instances or overall:
That's a bit of a junk drawer of ideas. Hopefully it will at least give you some more things to search the forums for.
I will definitely say that there is nearly always more than one way to achieve the same or similar result with AC with little or no scripting. It is definitely worth experimenting, particularly with the higher level functions like inventory and crafting.
Happy ActionListing!
I was referring to "two instances" of the same Action type, rather than two separate ActionLists.
Create a new ActionList asset, define an Inventory Item parameter in its properties, and add to it two copies of the Menu: Update content Action.
For the first, fill in the details for the Label element that should show the item's name, leaving Content type as Text. Override the New label is field with the Inventory item parameter. This will cause the Label text to be set to the Label of the Inventory item mapped to the parameter when run.
For the second, fill in the details for the Graphic element that should show the item's texture, this time setting Content type to Texture. Override the New texture field with the Inventory item parameter as before. This will cause the Graphic to display the texture of the Inventory item.
Then, for a given Inventory item, create a new "Standard Use" ActionList in its properties. Give this ActionList a single Action: ActionList: Run. Have this run the ActionList asset above (with the Menu: Update content Action). Set its Run mode to Set Parameters And Run, and set the Inventory item parameter to match the Item involved.
A tutorial that covers this Action type can be found here.
Hello. I've set up everything, but I'm getting some errors. I'm sure I'm missing something obvious in the logic. I've attached how everything is set up. I think the problem is either in the Jukebox_turnon (actionlist) or in "Update Content" fields where I've added the "?".
https://drive.google.com/file/d/1yRo1uo5HkGK_J65cahT3m7tEVlqlyv8A/view?usp=sharing < - inventory
https://drive.google.com/file/d/1jXyh-EJIJzad9qrCix1xamzn87ULOxTl/view?usp=sharing <- Menu.
Thank you again.
You don't need the ActionList: Run in parallel Action - you can just run one Menu: Update content Action after the other, as they'll both run instantly.
For those Actions, you need to insert the names of the Menu and Element you want to update.
It looks like "Jukebox" is the name of the Menu, but I'm not sure what the Element names are.
What should be the "Element Name"? Should it be the Inventory Item or the Inventory Box "Vinyl Collection" - which is a menu element within Jukebox. If I add the former (Inventory Item) - get an an error saying "Couldn't find menu element". If I add the latter (VinylCollection) - I get Object reference not set ot an instance of an object.
https://drive.google.com/file/d/1PdKIzftGYyFtfNGc56lLaWQb9GQn7Ixv/view?usp=sharing
For the case that you want to display the Inventory item's graphic, you'll want to set the Element name to a Graphic element in your Menu.
I don't know which element in your Menu this is - or if you have one. The InventoryBox element is the wrong type - make sure that your Menu has a Graphic element, and enter its name into the Action.