Forum rules - please read before posting.

Changing Cursors via Custom Script?

What would be the smartest way to change the main and interaction cursor icons to different ones when changing character?

I'm using direct movement and mouse and keyboard as an input method. Interaction method is Choose Hotspot Then Interaction.

I think it could be a good addition for AC to allow assigning different cursors for each player character.

Comments

  • Are you talking cosmetic changes (i.e. the graphic used for the "Use" icon), or literally which icons are available to a character?

    Icon textures (including the main) can be changed through script - just right-click the texture field to get an API reference to it.

    To change which icons are available to a character, this would likely be a case of having a custom script disable certain Hotspot interactions based on which player is currently active. Is that what you're meaning for?

  • Cosmetic changes only. I managed to get it working!

    Modified these lines to the Action Template in the correct places.

    public Texture CursorMain;
    public Texture CursorInteract;
    public Texture CursorInspect;

    AC.KickStarter.cursorManager.pointerIcon.texture = CursorMain;
    AC.KickStarter.cursorManager.GetCursorIconFromID(0).texture = CursorInteract;
    AC.KickStarter.cursorManager.GetCursorIconFromID(2).texture = CursorInspect;

    CursorMain = (Texture) EditorGUILayout.ObjectField ("MainTexture:", CursorMain, typeof (Texture), true);
    CursorInteract = (Texture) EditorGUILayout.ObjectField ("InteractTexture:", CursorInteract, typeof (Texture), true);
    CursorInspect = (Texture) EditorGUILayout.ObjectField ("InspectTexture:",

    Now I change the cursor when changing character. If the other character is in another scene, the change doesn't seem to work, so I have to check on start of every scene and load which player is active to assign the correct cursors.

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.