Forum rules - please read before posting.

Set cursor on Start

Hi Guys,

Quick Question - Is there a way I can set which cursor the game starts with?

I've only just discovered that Use and the Default cursor aren't they same thing - But the default cursor serves no purpose in game - And so the only want I can activate the use script is by using Single Use Interaction - but considering I have several cursors each with their own use interaction this wouldn't work well.

Also I notice even mousing over an interaction with this option selected resets the mouse to the default cursor too. But If I can fix the issue and get the game to start on the Use icon or eliminate the useless default cursor, that will be easy to fix.

Thanks.

Comments

  • Sorry, I'm really not clear on what you mean.  Please provide screenshots of your Settings and Cursor Managers, as well as shots of what you're referring to in-game.
  • I'll make a video, Stay tuned. <3
  • Video here:


    So to recap - 1. I'm finding the default cursor doesn't activate the USE interactions by itself. 2. Hovering over a single use interaction drops the cursor (That I can work around). So 3. what I wanted to do was activate the Use cursor on scene load since the default cursor has no purpose. OR replace the default cursor with Use.

    I figure it's going to be a custom script - that I can then build into a custom action to load when the scene boots or when a cutscene ends. 

    Ah, And here's the screenshots of the cursor Manager and interface settings. 
    image

    Hopefully it makes sense now.
  • Thanks, that's clearer.

    Things as you've described are how they should be.  The default cursor in "Choose Interaction Then Hotspot" mode is not a "use" cursor, so if 'single-use interactions' is disabled for a Hotspot then the correct icon needs to be selected.

    When 'Single-use Interactions' is checked, the game basically switches back to "Context Sensitive" interaction mode for that one Hotspot, allowing for a single-click interface.  It is just a convenience tool, however - you can find that the behaviour is the same if you disable it but instead change the Interaction method manually in the Settings Manager at runtime.

    I expect what you'd be looking for is a way to change this option dynamically, so that you have more control over when this mode is used.  You can get an API reference, to modify it through script, to any Manager field by right-clicking the field's label:

    AC.KickStarter.settingsManager.interactionMethod = AC_InteractionMethod.ContextSensitive;

    It may be that you'd want this to change when the side Menu is turned on, or when an interaction is run, or something else - see if you can work out the best time by changing the field manually, and I can advise on how best to change it through script.

    Also know that the "Choose Hotspot Then Interaction" mode can also be used to change the cursor dynamically, rather than choosing an icon from a Menu.  When using that mode, try setting the "See interactions with" to "Cycling Cursor And Clicking Hotspot" - perhaps it's a good use for this game.
  • Okay, that's... A lot to try to take in at midnight. XD

    Could I possibly set it to context sensitive but instead of right click for look - Can I set it up to run a verb coin? So Left click will work as use and right will bring up a verb coin menu to select the interaction?

    I think that might be an easier solution that changing the interaction mode all the time.
  • Or I suppose I could just go with Context sensitive and switch it to Hotspot then interaction for the investigation styled scenes. Which might be a better design choice to lock it off rather then having it available all the time.

    There's only so many ways to say that a book tastes like a book. ;p

    I'll try out the code to swap the interaction method you posted above out as a custom action and see how I go. Thanks for the advice.
  • Sure.  Also be aware that any changes you make to Manager fields are kept when the game is exited, so you'll need to also set them to their default values when the game begins.  You can do this with custom Actions placed in your game's "ActionList on start game", which can be defined in the Settings Manager.
  • So I've put 

    AC.KickStarter.settingsManager.interactionMethod = AC_InteractionMethod.ContextSensitive;
            return 0f;

    as my run code for a Custom Action to switch the code - The error I'm receiving is "Class, Struct, or interface method must have a return type." is this not covered by return 0f;?

    Thanks for your help so far.
  • Where in the script?  Reference line numbers are always necessary when debugging code.

    That should go in your Run() function, but it looks like something else has been removed, perhaps a closing brace.

    A tutorial on writing custom Actions can be found here.
  • edited November 2017
    Yeah, It was in my run() function, But you're right, I lost a brace while converting my Remove inventory into this.

    Sorry, I had triple checked the run() before commenting, But I lost it all the way back up at public ActionSwitchContextSensitive() and hadn't noticed.

    Once that was fixed - it works perfectly!

    Thanks again for all your help!
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.