Forum rules - please read before posting.

Rewired AC Integration Script

2»

Comments

  • By how much is this affected by Rewired?  So long as your Input method is set to Keyboard And Controller, relying on the "first selected" properties within the Menu Manager should be enough to assume direct control.

    Also bear in mind that if your menu doesn't pause the game, you'll need to use the Engine: Manage systems Action when it turns on to allow direct control over it in-game.
  • I think it was pretty much 100% Rewired.  I didn't realize I needed the Engine: Manage Systems Action setup...so now that's working with my good ol' AC menu!  Hooray!

    Thanks, Chris!

  • Anyone have any experience triggering a Rewired Control Mapper UI screen from an AC menu and have it go back to the AC menu once you're done with your changes?
  • edited October 2018
    Realized I never came back to this thread to let people know how I did this.

    First, I installed Control Mapper into my scene:

    https://imgur.com/vOZ7voq

    Next, I created an AC menu that sent a custom message of "Open" to the ControlMapper gameobject:

    https://imgur.com/Jswt6w0

    Then I needed to create a custom script that would allow me to trigger an actionlist on a Control Mapper UI event, so I found this one on the AC forums:

    ---

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using AC;

    public class Trigger_AC_ActionList : MonoBehaviour {
        public AC.Cutscene myCutscene;
        public AC.ActionListAsset myActionListAsset;
        
        public void RunCutscene ()
        {
            myCutscene.Interact ();
        }

        public void RunActionListAsset ()
        {
            myActionListAsset.Interact ();
        }

    }  

    ---

    Added that script to a new gameobject and then created an Actionlist that sends a custom message of "Close" to the ControlMapper gameobject:

    https://imgur.com/FS6UdN5

    Then I had to find the "DoneButton" object within the ControlMapper gameobject which is the UI button that confirms that you are finished with your changes when making input adjustments on the Control Mapper screen.  From there, I added a new event on the "On Click()" call and pointed it to my new gameobject that references the custom actionlist and triggered it on the "Trigger_AC_ActionList.RunCutscene" behavior:

    https://imgur.com/vAkaSSH

    After that, I just customized my Control Mapper screen to how I wanted it and made sure all of my changes were being saved.

    Hopefully, that helps some people!
    -z


  • Thanks, @themightyzq! I got it working.

    I was wondering about the need to Send Message:Close action to close ControlMapper. When you click on Done in the ControlMapper menu, functionality already seems to be built into it for ControlMapper to close. Was this not the case for you? It throws an error when I try to use the Send Message:Close action per the setup above, but since it closes without it I was going to remove it, and I wanted to make sure I'm not missing something where that action is needed.

  • I'd have to look at my setup again, but you might be able to get away with not using the close action!

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.
Do NOT follow this link or you will be banned from the site!