Forum rules - please read before posting.

Camera Inventory

edited December 2023 in Technical Q&A

Aside from the main inventory, I am wanting to create a second inventory that is driven by a camera system.
Such as the player clicks on a camera icon. It displays the back of the camera and the current scene in the display area. The player can then take an image of what is in the camera viewport, and the captured image is placed into the camera inventory that can be reviewed later.
Wondering on the best way to set this up. Thx.

Comments

  • edited December 2023

    Image Reference
    imgur.com/a/ajkQtE8

  • You can create a separate Inventory either by placing items in a global Container (see this wiki script), or by creating a separate Inventory category, and filtering your two InventoryBox elements to show only one category.

    Things'll get tricky if you want the item's graphic to be that of the viewport - is that your intent?

  • @ChrisIceBox Thank you this is a big help. The approach would be the player takes an image and it goes into the photo inventory. Here is an example from Meridian 157.

  • edited December 2023

    Here is a link. Go to 8mins 35 seconds. Could not get to work properly with the forum link setup...sorry
    (http:// "")

  • Thanks for the details.

    If you don't require use of Inventory re-ordering / gaps in the Inventory, you can use the Player's Inventory for both regular items and photos, and then just place them in different categories and filter them in your Menus.

    As for the photos themselves: the approach really depends on how many pictures you'd allow the Player take.

    To have the photos themselves be dynamically generated - i.e. the game itself takes a screenshot at runtime - would need a fair bit of custom scripting, as you'd also need a way to save/load the texture data inside an Inventory String property.

    It's not impossible, but you might find that simpler is better:

    The other way would be to simply define a separate Inventory item of each photo the Player could conceivably take - and then just add the appropriate item based on which scene you're currently in. This might be a bit of legwork, but the key advantage I'd say here is that you'd automatically benefit from being able to e.g. prevent the Player from taking multiple photos in the same spot - since you can just limit the Item count for each to 1.

    To avoid creating the same set of Actions (e.g. Scene: Check, Inventory: Add etc) each time the Player snaps a picture, you could move these to a dedicated ActionList and use parameters to control them at runtime. I'd recommend just starting with one or two without this, first, and taking things from there.

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.