Forum rules - please read before posting.

Switching "Drag and drop inventory interface" on and off depending on the scene

Is it possible to toggle the setting "Drag and drop inventory interface" on and off for any given scene.

Has anyone had to do something like this? Is there a simple way?

If not, I suppose it can be done via script or custom action? Any pointers would be much appreciated.

Comments

  • It's not something that would be common enough to warrant an official Action, but any Manager field's value can be changed at runtime through script. Just right-click the field's label to get an API reference to it. In the case of the Drag and drop inventory interface? field, this is:

    AC.KickStarter.settingsManager.InventoryDragDrop
    

    You can set this in a custom Action, but it's also possible to just call a function via the Object: Call event Action.

    For example, create a new C# script named DragDropSetter, and place in it two functions:

    public void AllowDragDrop ()
    {
        AC.KickStarter.settingsManager.InventoryDragDrop = true;
    }
    
    
    public void PreventDragDrop ()
    {
        AC.KickStarter.settingsManager.InventoryDragDrop = false;
    }
    

    Attach it to a GameObject in your scene, then make it a prefab. You can then use the above Action to run the "AllowDragDrop" and "PreventDragDrop" functions in your OnStart cutscenes.

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.