Forum rules - please read before posting.

Changing Manager Settings

My initial scene requires to have the "lock cursor in screen' unchecked, then when the scene changes I need to have it checked (I use different Players in each). I have tried to create another Asset file called differently SettingsManager_blabla  but since both scenes are inside the same project whatever I use for the ManagersSettings are used in all scenes.

I tried Player constrain but the 'lock cursor in screen' continues to be checked.

How can I do this?

Comments

  • If you wish to change a variable in the Settings Manager, better to create an Action that changes the value - rather than swap the Settings Manager asset file entirely.

    The "Lock cursor" option can be found in the Scripting Guide here.  Please refer to the Scripting Guide when you need to know a public variable.

    To change it, you can simply set it's value with the following command:

    AC.KickStarter.settingsManager.lockCursorOnStart = true;

    This would need to be placed in the Run function of a custom Action.  You could write an Action that sets the variable to True or False based on a GUI option.  Just be aware that changes made to the Settings Manager will be retained when the game ends, so use this Action when your game begins to set it to the correct "default" value.
  • You mean I have to write a complete script as per your guide just to setup this variable? Too complicated for me. I have changed the 1st person character to a 3rdperson one and I don't have to use the 'Lock cursor' It's a pity I preferred the 1st person .. 
  • Back up a moment.  Are you just using 1st person for both characters, or are you switching perspective as well as players?

    The "Player: Constrain" should have a free-aiming lock, but this won't affect the checkbox in the Settings Manager.

    I answered your question as to how to change that checkbox, but if you can explain the need for this it's possible there could be an alternative solution.  Please describe the root problem as clearly as you can.
  • First scene is a space ship and  a space sky and some buttons with the name of different destinations (Jupiter, Earth,etc.) which are circles (with some nice texture).The ship moves to the destination by  an Object:Transform and use the coordinates of the particular planet. Here I MUST have the lock cursor in the screen OFF

    Once the ship arrives I do a change scene and would like to use TinPot (as in all my previous games) to move around in the new scene. Here I have to have the lock cursor ON.

    I tried to use a Player constrain but as u say it doesn't change the ManagerSettings.

    In the meantime I am using a third person character to move around in the destination scene but it's too cumbersome and would prefer 1stperson



  • Try this:
    1. Enable the Lock cursor  in screen's centre option.
    2. At the start of your first scene (when you want the cursor unlocked), use Player: Constrain to disable free-aiming.  It won't change the option in 1), but it will override it - allowing cursor movement.
    3. When you want to control the player normally, use the same Action to re-enable free-aiming first.
  • IT WORKS !!! thanks a lot :-bd
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.