Forum rules - please read before posting.

Changing and saving mouse freelook sensitivity in game

Hi,

I have a first person setup for my game and I'm trying to allow the player to change the Freelook sensitivity in the First Person Camera script through a gui slider. I would like for the change to get saved so that whenever they quit the game, the value will be as they set it when they start the game again.

I've been able to achieve the first part, setting the sensitivity value in-game via a slider, through Playmaker. However, I don't know how to get the value to be saved because it will reset when I exit Play mode. Does anyone know if there's a way to save the sensitivity value after it has been changed in-game?

Thanks,
Jason

Comments

  • You can connect an AC Global Variable to Playmaker, and then run an Action to apply the variable's value to the sensitivity value once changed.

    However, you would need for the Playmaker variable to persist. Instead, you can connect the AC Variable to Options Data - which stores it in the PlayerPrefs and is independent of save game files.

    See the Manual's "Options data" chapter, as well as this tutorial for an example.

  • Thanks, Chris!

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.