Hello! I've been using Adventure Creator for a while, but this is my first time really trying to customize it, so I figured I'd hop on over here to ask a few questions and for a few pointers. Sorry if I'm asking a lot, so I guess I'll just order them in the order of personal priority.
// Testimony //
What I'm looking to make is a "testimony" system, ala that of Ace Attorney. The general idea, for those who haven't played, is that players are given a five-or-so line testimony, and each line can be "pressed" to initiate a short dialogue about that particular statement in the testimony. Working in tandem with this is the ability to present evidence, marking the intended solution to the puzzle. If the right piece of evidence is presented, the player proceeds onto the next piece of dialogue and then onto the next piece of testimony.
(Here's an example, for the visual learners like me.)
But, integrating this would mean doing something radically different with the inventory, which brings me to...
// The Inventory //
In Ace Attorney, the menu can be brought down in two specific contexts. One is outside of court, where you can flip three sub-menus, Evidence, Profiles (which works the same as evidence, but contextually, you know), and in the later entries, a questlog, which I am not even going to even think about tackling for a while. Outside of court (and instances where the right evidence is needed to proceed in dialogue, calling on the inventory to open), it mainly serves as a way to review necessary information. The single layer inventory screen (in the context of a cross examination) can be shown here, dimming the background and showing the evidence/inventory menu, where the correct piece of evidence has to be selected before it can be presented with a button press, along with its functionality in the sequel (and the one I'm personally shooting for).
Sorry if I'm asking for a lot, I hate to be an ideas guy, but I'm a rookie programmer/artist who is very, very tired of staring at brick walls. It feels like I have everything I need, I just need a push in the right direction to start piecing it all together.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @ZaraNerd.
Quite a lot to cover here - it should all be doable (though some custom scripting may be needed as we go), but tackling these one-by-one will make things more manageable, if you're happy with that.
For Testimony - that is, the ability to interrupt someone speaking - you should be able to achieve this with the Active Input system, which lets you run an ActionList when a given input is pressed.
Essentially, you can have an Active Input that itself runs a further ActionList: Run Action that has the line-specific cutaway. This Action would use a parameter (either GameObject for a scene-based ActionList, or a Unity Object for an ActionList asset) so that you can set this ActionList dynamically for each line.
Have the Active Input be disabled by default, and then - when the line of questioning begins - run the Input: Toggle input Action to enable it, along with the ActionList: Set parameter Action to set the above-mentioned parameter to a separate ActionList that handles the cutaway. When the questioning ends, or during the cutaway, disable the Active Input again.
I'm describing this in a general approach, so if you need further detail just let me know and I can elaborate.
For inventory, you'll likely want to rely on InventoryBox elements set to "Custom script", so that you can customise the exact behaviour when items are clicked. Hooking ito the OnMenuElementClick and OnMouseOverMenu custom events will be useful here. If you want to exclude these items from other Inventory menus, you can use Categories to filter them. This would also be how you can create Evidence / Profiles etc that only show Items of certain Categories.
Though, a quick-and-dirty alternative would be to instead rely on a regular Conversation system - with each option being linked to an Inventory item so that it only appears if a given item is in the Player's possession.
Hello! So sorry about the wait, I've been taking the time to learn before getting back to the project. I'm still not as good at custom scripting as I'd like to be, and now that I'm working on the menus themselves I thought I should elaborate more.
I'm not well versed in manually scripting at all (and a bit of a slow learner) so all the detail you can give is appreciated. I have the inventory set to upon upon the press of a key, and there are some things I need help with. Namely, switching between selected items in the inventory by pressing the left and right arrow keys/WASD on keyboard, and displaying the item name and description (along with the photo) on the top portion (what I have currently vs. what I'm shooting for).
Oh! I forgot to add, some inventory items/evidence have another keypress associated that opens up a full screen document view or photo (like inspecting page text in the newer Resident Evil installments)
See the Manual's "Navigating menus directly" chapter for full details of how to switch items with arrow keys. If you don't mind pausing the game however, a quick way to do this is to just check Pauses game? in the Menu's properties, (if using Unity UI) Auto-select first visible element?, and Directly-navigate Menus when paused? at the top.
If you don't have more items than can be shown in the Menu at once, you can remove the default ShiftLeft / ShiftRight buttons.
For the name/description: create a pair of String properties in the Inventory Manager's Properties tab, named e.g. Name and Description. In the Items data, you can then fill this data in for each item.
To display these fields when selecting an Item, create Label elements in the Menu, with the Label type set to Inventory Property, and the Inventory item source to Mouse Over Item (this will work for directly-navigated items, too). Then set the properties you want them to show.
The expanded item texture may need custom scripting to show, but start with a Graphic element in its place for now, and we'll revisit that once the above is working.
That'll be a case of creating a "Use" interaction for such items that run e.g. a Document: Open Action, but again probably best to tackle things in turn.
Hello! I've been working, and I have something useable. The blown up item display view is just static and set to the badge at the moment, but there are some small things I'd like to work out. I'd like to be able to adjust the item scroll cutoff (it's going jarringly into the end of the background), and have the arrow key navigation scroll the menu (i.e. if it's on an item that cannot fit in the menu the menu will scroll to fit it).
To reduce the number of items shown at once, reduce the InventoryBox element's Max number of slots value. If Unity UI is used to render the Menu, similarly remove unwanted linked Buttons.
To have auto-scrolling, you'll need to use Unity UI, and also bring back your ShiftLeft/Right buttons (you can copy them from the Default_MenuManager's Inventory menu if needed).
A custom script will then be needed. The general principle is that you make these buttons invisible in your UI, but still have them be selectable when navigating (i.e. when pushing "right" when on the last item slot). When selected this way, make use of a custom script to automatically click it, and then re-select the item slot again.
Something like this, attached to the two buttons, should do it: