Forum rules - please read before posting.

Making an in-game internet?

Hello, I wanted to make a point and click detective game where the player can bring up their laptop, search through a suspect's social media profile and save posts as clues in their inventory. I also wanted to implement this mechanic a few point and click adventures have where the player needs to actually type in the names of people or places they hear throughout the game in order to unlock their profile/location on the map

Comments

  • edited February 2022

    Welcome to the community, @brandonweiler99.

    It's a complex topic, and one that would certainly require custom scripting - the fine details of such a mechanic will be very specific on your requirements.

    Typically, though, this kind of problem comes down to two main areas:

    1) Storing and collecting the relevant data to display
    2) Displaying that data in a UI

    For 1), you can rely on AC's Inventory Manager for much of the data storage - since you want each post to be an item that the player can collect anyway.

    For each post, you can create an associated Inventory Item. To prevent such items from showing in your "regular" inventory menu, you can rely on categories. Go to the Inventory Manager's Categories tab, and create a couple - "Regular" and "Posts". You can then place your "post" items in the "Posts" category.

    You can also define custom data for items, limited by category. If you go to the Inventory Manager's Properties tab, create a couple of String properties named e.g. "Post author" and "Post text". Check Limit to set categories?, and you can have these only available for your items in your "Posts" categories.

    You can then select such items back in the Items tab, and enter in an author and post text.

    To make use of this data, you'll have to rely on scripting. First though, you'll need a means to gather up the posts for a given character. Here's a script that you can do that with, by calling it's GetPostData function:

    https://pasteall.org/EG7N

    This script works by going through all items in the Inventory Manager, and looks for those that are in the right category, and have the right "Post author" text.

    Note that you don't actually have to rely on AC to store this data, but having a built-in connection between the data and an inventory item makes it easier to later add the "post" item to the Player's inventory later on. This, too, can be done with scripting

    AC.KickStarter.runtimeInventory.Add (new AC.ItemInstance (myItemID));
    

    How you actually make use of this data will depend on 2), and will require further custom scripting. AC won't be strictly involved here, however, as its more to do with the displaying of text etc that's now no longer referencing AC.

    For the typing mechanic, you can make use of AC's Input element type to accept text from the Player, and then pass it to a String variable and use the Variable: Check Action to process it. This tutorial covers the principle involved.

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.