Forum rules - please read before posting.

Change cursor in custom UI

Hi,

For learning purposes I would like to create a custom UI, similar to the one in PQ3. I am struggling however on changing the cursor to walk mode, talk mode, look mode etc., whenever I click on the corresponding button. Am I supposed to use Action Lists or custom script? Is there an example available somewhere perhaps? :)

Regards,
Óskar G.

Comments

  • edited March 2022

    Welcome back, @OskarGunn!

    To have your interface involve first clicking an icon type, and then the Hotspot you want to use in that way, you'll want to set your Settings Manager's Interaction method to Choose Interaction Then Hotspot.

    Changing the active icon type is then a case of clicking an Interaction element mapped to a particular icon. You can test this out with the default interface by changing your Interaction menu's Appear type to During Gameplay, and then clicking its various Interaction elements to change the icon mode.

    The Manual's "Choose Interaction Then Hotspot" chapter covers how this way of interacting works.

  • Thank you for this quick reply :)
    I am embarrassed to say that i hadn't noticed the Interaction part of the manual. But surely will look at it.
    I am testing some things, not yet achieved full functionality, but will let you know how it goes :)

  • @ChrisIceBox I managed to create an iconbar which behaves in the manner I would want, however I can't seem to find the setting which enables me to change the cursor into the right texture (and remove the text from the cursor whenever I choose an interaction).
    I created a youtube video which shows the behaviour and settings. I hope everything is visible enough on it :)
    The link to the video is here:

  • edited March 2022

    I can't seem to find the setting which enables me to change the cursor into the right texture

    Check Change cursor based on Interaction? at the top of the "Interaction icons" panel in the Cursor Manager.

    (and remove the text from the cursor whenever I choose an interaction).

    If you want to only show this label when over Hotspots or inventory items, check Only show label when over Hotspots and Inventory? back in the Cursor Manager.

    This label comes from the Hotspot menu. If instead you want to remove it completely, you can check Start game locked off? in the Hotspot menu's properties panel to prevent it from showing at all.

  • @ChrisIceBox I should have looked a little bit better at the settings. The "Change cursor based on interaction" completely eluded me o:)
    And yeah, wow I would probably not have noticed that about Hotspot label aswell :)

    Would you recommend using Hardware cursor rendering? It obviously could produce problems on older systems I guess, like stated in the manual. But it does remove the system cursor while in Unity play mode.

    Again, thanks a million for your help! :)

  • To clarify: it's Software rendering that may be slower on (very) old systems, but in my experience it's not typically something to worry about.

    I'd recommend Hardware, but you're free to switch between them while developing vs building.

  • @ChrisIceBox Is there a reason why the default Walk Cursor doesn't appear in the Interaction Cursor: dropdown list? I would like to be able to switch to the walk cursor whenever i click on the Walk icon.
    Perhaps another question would be to perhaps mimick the walk functionality on a new interaction cursor, although I am not sure how to do that :)

  • Interaction icons are limited to those that can be used on Hotspots.

    It is possible to define "Walk to" as an Interaction icon so that you can define such Interactions for Hotspots (even if automated). The "Nine verbs template" does something similar to get the "Walk to [Hotspot]" verb line showing correctly.

    To just reset the cursor back to "Walk" mode, though, it's not necessary to rely on an Interaction element.

    Instead, first make sure that Provide walk cursor? is checked in the Cursor Manager.

    You should then see that "Icon_Walk" is listed as an available input button in the Settings Manager's "Available inputs" panel. If an input named this is pressed, the cursor will be reset back to "walk" mode.

    To have this occur when clicking in the menu, create a Button element and set its Button click type to Simulate Input, and then have it simular this "Icon_Walk" input.

  • That works like a charm :)

    There is however one small issue.
    Is there a way to not let the cursor change to the main cursor each time the iconbar appears and Walk Mode is selected.
    Not sure how to explain this. Let's say I click the "look at" interaction; then the cursor changes to an "eye". When I go with the mouse to the top again, the iconbar appears and the cursor remains an "eye". If I then click on "Walk To" button, the cursor should change to "walk to", but changes to default cursor. When I move the mouse down (and the iconbar disappers), then the cursor changes to "Walk To"....

  • I'll attempt a recreation. Can you share your full Settings and Cursor Managers, as well as the properties of the Menu and its "Walk to" Button?

  • I created a youtube video with all the properties. Wasn't sure how to post images here :)
    Hopefully the HD version is available soon.

  • My mistake - "interaction icon" cursors are allowed over menus, but the "walk cursor" is not. You'd have to rely on a special "Walk to" interaction icon after all, and then use a regular Interaction element to enable it in the menu.

    However, interaction icons themselves do not cause the Player to walk - so I'll need to look into how this might be done. Likely through some option to "sync" the regular Walk cursor with an Interaction icon, so that the interaction icon behaves like the Walk cursor.

  • Would I need to perhaps use a custom script or are you considering to put it in a future release? :)

  • Yes, it's something I'm considering as part of an update.

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.