Forum rules - please read before posting.

Interactions with gamepad buttons, hotspot icon behind hero, hotspot label position

Hello.

I use Adventure Creator version 1.51b, and Unity 3D version 5.3.3f1 Personal.

I have been working on an 2D adventure game. I am newbie to Adventure Creator and Unity 3D.

Some settings in my project:
movement method: direct
input method: Keyboard or Controller (I would like to use gamepad)
interaction method: Choose Hotspot Then Interaction
select interactions by: Cycling Menu And Cycling Hotspot
see interactions with: Click On Hotspot
[v] lock cursor in screen's centre when game begins?
[v] hide cursor when locked in screen's centre?
hotspot detection method: Player Vicinity
hotspots in vicinity: Nearset Only
display hotspot icons: Always
hotspot icon type: texture


In my game, a main hero walks only left or right.

When a hero is close to a hotspot, the interaction menu appears automatically (I have already done this and it works right).

Hotspot's icons (a white dots in a centre of hotspot's area) are always visible.

My questions are:

1. How to make hotspot's icon to be placed behind a main hero? Now it covers a hero (white dot covers hero's face).
image


2. How to make hotspot's label ("Tajemniczy przedmiot" in the picture below) to be placed for example above hotspot? Now it is placed above cursor (which is invisible and locked in screen's centre).
image


3. How to make it to be possible to choose options from interaction menu with use of gamepad buttons?
image


Thanks in advance for your help.

Best regards,
 Motoman.

Comments

  • Welcome to the community, @motoman.

    1. As Hotspot icons are drawn in a separate GUI call to character sprites, I'm afraid this is not possible.  When making 3D games, there is an option to draw icons in World Space as opposed to Screen Space - I will have to see if a similar option for 2D games might solve the problem, but I cannot guarantee it.

    2. Open the Menu Manager and select the Hotspot menu (this is just a default provided Menu).  Change the Position from Follow Cursor to On Hotspot.

    3. Currently you can only map input buttons to cursors if your Interaction method is Choose Interaction Then Hotspot (i.e. Sierra-style).  However, I will add this for Choose Hotspot Then Interaction as well in an update.
  • 3. Currently you can only map input buttons to cursors if your Interaction method is Choose Interaction Then Hotspot (i.e. Sierra-style).  However, I will add this for Choose Hotspot Then Interaction as well in an update.

    It would be so nice, because I do need such a feature for our game.
  • My solution to this will be to allow Buttons, Interactions and other single-slot menu elements to be alternatively-triggered by pressing a defined input button.  This will have the same effect as 3) but will also give greater flexibility for other uses.
  • edited April 2016
    Thanks to update 1.51d, now it is possible to define "Alternative input button" for interaction menu's buttons. I defined buttons in "Input" and entered their names in "Alternative input buttons". Unfortunately, menu's interactions do not start after pressing buttons on gamepad.

    For debug purposes I entered "Debug.Log" line in PlayerMenus.cs:

    image

    This Debug.Log shows "ButtonUse", "ButtonLookAt", "ButtonTalkTo" when I press buttons on gamepad. But interactions do not start. What have I done wrong?

    image

    image


    image


    image

  • Try commenting out the CheckClick line beneath your Debug.Log and un-comment the element.ProcessClick beneath that.  Does it work for you then?
  • It is likely because you've checked Ignore cursor clicks? in the Menu's properties.  The buttons will not respond if the Menu itself is non-interactive.
  • edited April 2016
    Hello.

    Thank you for the response. I have done what you wanted me to do, but without positive results -- interactions do not start.

    I put some more Debug.Log in a few files (please, see pictures below). In EventManager.cs variable OnMenuElementClick is null, so it does not call OnMenuElementClick() -- maybe it is a clue.

    What should I do next to solve problem or debug?

    Thanks in advance for your help.


    image


    image


    image


    image


    image




    Even if "Ignore Cursor clicks?" in unchecked both in "Hotspot" and "Interaction", it does not work.


    image


    image
  • In the Settings Manager, change Select Interactions by to Clicking Menu.  Your current interface expects the player to click on the Hotspot, so clicking the Interactions normally should have no effect.
  • I set "Select Interactions" to "Clicking Menu", but without positive results. In EventManager.cs variable OnMenuElementClick is still null, so it does not call OnMenuElementClick()

    image


    image


    image

    image



  • edited April 2016
    OnMenuElementClick will always be null because you haven't defined it - it's an event that you can use to run your own code when elements are clicked, and doesn't affect how menus behave.

    You can see from MenuInteraction.cs that the ProcessClick function (which you've shown is running as normal) is calling PlayerInteraction's ClickInteractionIcon function.  Try placing debug logs in there instead.  You can display a menu or element's title by logging their title variable.
  • edited April 2016
    Thank you for the time you spend on helping me.

    image

    image


    image



    image


    I wonder, if "AC Game Editor" / "Menu" / "Interaction" / "Appear type" should be set to "On Interaction", not "On hotspot" like in my case?
    If I set "AC Game Editor" / "Settings" / "See interactions with" to "Cursor over hotspot" and I set "AC Game Editor" / "Menu" / "Interaction" / "Appear type" to "On interaction" then interaction menu appears automatically (fade in) when hero is near to a hotspot, but it automatically disappears (fade out) in a second.
  • Problem solved. Some settings were wrong.

    Right settings:


    image

    image


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.