Variable increments when I press any button, not the ones I want to.

Announcements, support questions, and discussion for the Dialogue System.
olikante
Posts: 13
Joined: Sun Feb 21, 2021 8:23 am

Re: Variable increments when I press any button, not the ones I want to.

Post by olikante »

Yeah... I know why it is happening. It increments on disable. Other buttons lead to different scenes, so they are disabling my flower and incrementing my variable. It is a shame that it can't be on click or something else. I need to figure out some other way to use it in my setup...
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Variable increments when I press any button, not the ones I want to.

Post by Tony Li »

If you change scenes using any of the methods listed here (How To: Change Scenes) the Increment On Destroy component will not increment when you change scenes.

Alternatively, if you can't use any of those methods, you can call PixelCrushers.SaveSystem.BeforeSceneChange() before changing scenes as described in that link.
olikante
Posts: 13
Joined: Sun Feb 21, 2021 8:23 am

Re: Variable increments when I press any button, not the ones I want to.

Post by olikante »

Ok, I will check it out.

I'm truly impressed by the support.

:)

Have a nice day!
Post Reply