Forum rules - please read before posting.

Confirmation menu with item close up

Hello, im making a hidden object game about selling things to customers. I want to create menu that pops up when you click a hotspot, a menu with close up image of item, its description and a button to cancel and button to sell which will remove item/hotspot and trigger other reaction(dialogue and add points). I already worked out how to make buttons and make one that cancels, but i cant figure out how to do rest ;-;

Comments

  • Though you haven't explicitly said so, I'm guessing that you want to have this work for more than one Hotspot, right?

    Start with just one Hotspot.  In the Menu, create a Label element for the description etc, and then set it's Appear type to Manual.  You can then use the Menu: Change state Action to control its appearance in ActionLists.

    Then create your "Sell" button, and have it run an ActionList asset.  This asset should change that Hotspot as desired - try parenting the scene graphic/sprite to the Hotspot and using a single Object: Teleport Action to remove it from view.  A Dialogue: Play speech Action can be used to give a character something to say.

    To add points, see this tutorial.

    Once, and only once, you have things working for one Hotspot, you can then modify your ActionLists to have them work for any Hotspot through ActionList parameters.  This feature is covered in the Manual's Section 5.15 as well as this tutorial, but essentially they allow you to recycle ActionLists by changing specific fields each time they're run.

    You could then, for example, add a "Object to Teleport" GameObject parameter to your "Buy" ActionList, that is used by your Object: Teleport Action to change which object is teleported.  When your Hotspot is then clicked, you'd use the ActionList: Set parameter Action to set this parameter's value to that Hotspot.  Similarly, you could make a "Reaction speech" String parameter to change the dialogue reaction.

    As for the description, for that you'll need to use a Variable token.  Similar to the score tutorial above, you can create a global variable (this time a string), and display it's value in a Label menu element by entering that label's text as the variable's token.  When the Hotspot is clicked, you can then use the Variable: Set Action to change that variable's value to the description you want, and it will update it's display in the Menu.
  • Hi, great response, thank you Chris. I was able to do most of what you said, but i still struggle with some stuff. When i set parameters to teleport and to response they stopped working, like, nothing teleports and action list just ends, or line is not spoken. Here are action lists for this
    https://ibb.co/iJqd0G
    also item description in menu works well thank you very much, but i still cant figure out how to show bigger image/close up of clicked item in that menu above description :/
  • edited December 2017
    You haven't shown how you're running the "Sell" Interaction.  When and how are either of these two ActionLists run?

    Bear in mind that the "al1" shouldn't be called by the Hotspot directly - instead, it should be run by that Hotspot's Interaction.  That way, you can set up its parameter values before it gets run.  Ideally, "al1" should be an ActionList asset so that it can be run from any scene.

    You can also set parameters in bulk by using the ActionList: Run Action to run an ActionList with parameters.

    You can also enable comments for Actions by right-clicking their cog icon.  If you then check Print Action comments in Console? at the bottom of the Settings Manager, that will help you debug things as you can use that to determine what gets run and when.

    As for having an image, there are a number of ways you could do it:

    1) Creating a Graphic menu element for each possible Hotspot, hiding them all, and then showing only the correct one each time.  Not really ideal.

    2) Creating a single Graphic menu element, and changing its image / texture with each Hotspot.  This is the action I'd take, but it would require custom coding

    3) Create a separate inventory category just for "close up images".  Categories can be defined in the Inventory Manager, and you can limit InventoryBox elements to only show items in a given category.  Therefore, you could think about showing an InventoryBox menu element instead, that shows one item from this separate category.  Setting the Inventory box type to Custom Script will mean it has no reaction to clicks, and you can then add a new item from that category before showing the menu - with that item's graphic being the image you want to show.
  • Yay, changing al1 to asset worked, thank you :D
    Well, but there appeared another problem, for some reason after i sell second thing, sprite disappears as it should, but i can still see name of item on hover (its not interactable), even tho when i look at scene view hotspot is correctly teleported, weird. I'll probably just turn off hovering name, i didnt intend to use it anyway. I also have small problem with speech, it disappears by itself even when i turned 'display forever until user skips it' :/
  • The Hotspot label appears when you hover over where the Hotspot used to be, and disappears when you move the mouse away?

    Very strange, without seeing any shots of your scene I can't think why that would be - but you can also explicitly tell a Hotspot to disable using the Hotspot: Enable or disable Action.  If you are sending the Hotspot as the parameter to teleport, you can use that same parameter in that new Action as well.

    As for the speech, is it or the ActionList it's in set to run in background?  Try playing some test speech a regular OnStart Cutscene - does it then behave as it should?
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.