Forum rules - please read before posting.

Set Interaction A and B to Accept and Cancel. (Direct Control)

Hi everyone! I was wondering if there was a way to set the interaction A and B to work as the "Accept" and "Cancel" buttons in good old console style. The game I'm designing is going to be direct control, Keyboard or Controller, so I don't need the use and examine actions to be separated into A and B buttons. Ie.: I want the player to get close to an object and press "A" to check it, and let me decided what the player can do depending on the Actionlist attached, but currently I have to press "B" to perform an examine... I was thinking of feeding both Interactions the same input key, but I'm not sure if that may conflict at all? not to mention that doesn't give me a cancel/return button. I was also thinking of using "choose hotspot then interaction", but It's not exactly what I had in mind. 
 
Anyways, any advice would greatly appreciated as usual!

Comments

  • If you set your game's Interaction method to Choose Hotspot Then Interaction, you'll have the option in the Settings Manager to See interactions by Clicking Hotspot.  This will give you the ability to select Hotspots with InteractionA.  This will then bring up the Interaction menu, but you can make this invisible if you want - what's important is that it's open so that AC can detect the player interacting with it.

    To de-select the Hotspot, you can write a custom C# script that checks for your own input in an Update function, e.g.:

    Update ()
    {
      if (Input.GetButtonDown ("Cancel")
      {
        // De-select the current Hotspot
        AC.KickStarter.playerInteraction.DeselectHotspot ();
        // Close the Interaction menu(s)
        AC.KickStarter.playerMenus.SetInteractionMenus (false);
      }
    }
  • Hey, Thanks! I'll give it a try later today!
  • Hi Chris,

    I am trying something similar to this. Essentially I want direct control (using a gamepad) where the cursor is invisible and its the player's proximity to the hotspot that highlights the hotspot (as if the mouse cursor was hovering over it). Then pressing A on the gamepad will enable the hotspot. I have played around with the settings and have got half way there but have run into a few issues:

    I can control the player with the joystick no problem but do I have to write a script to set the cursor to follow in-front of the player? I cannot set the cursor invisible ('Hide Cursor when locked' does not seem to work) I think it's too sensitive so not fully deactivating. 

    Thanks for any info.
  • edited May 2016
    Yeah, that happened to me to, but there's an easy fix. Just go to the cursor manager and remove the icon for the pointer, then the pointer will fully disappear... then you can just lock the cursor in center, which seems to work just fine, the player still seems to detect hotspots according to the collider, but I do would like to make sure the pointer stays on the player just to be on the safe side, seeing how the player can sometimes outrun the center of the screen and I don't know if that can affect the detection...

    Also, I still leave the check to hide it, but I think it's most probably not necessary at that point.
  • On top of this, the Cursor Manager also gives you an option to only display the cursor when the game is paused - this is useful if you want it hidden during gameplay, but visible during e.g. the Pause menu.
  • This tutorial describes how to create a hotspot detector on the player prefab, that should help with context-sensitive hotspots. That's how I do it in my direct control gamepad game and it works really well.
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.