playMaker

Author Topic: How to keep energy bar toolkit value after restart/load level  (Read 2191 times)

akira

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Hi all,
First of all, sorry for my english..

Okay, so here i am again..with a new question..i couldnt find any tutorial out there about my problem..or maybe i searched it wrong..

Im using energy bar toolkit for my health system..and using the love type energy given in the package..so far i know how to change the value when my player hits the enemy or traps..and the energy bar working fine..

My game setting is when player hits an enemy or traps, the energy will decrease by 1..and then the level will restart..

After restarted, all the game will be reset including my energy bar..So how can i save/keep my energy bar value after i restart/load the level? I tried using dont destroy on load action, but still no luck..





1982

  • Junior Playmaker
  • **
  • Posts: 71
    • View Profile
Re: How to keep energy bar toolkit value after restart/load level
« Reply #1 on: June 10, 2014, 08:18:39 AM »
Make it a global variable.

akira

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Re: How to keep energy bar toolkit value after restart/load level
« Reply #2 on: June 10, 2014, 10:12:32 AM »
Err..can u pls explain more details?

akira

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Re: How to keep energy bar toolkit value after restart/load level
« Reply #3 on: June 13, 2014, 07:27:41 AM »
Anyone here care to help me?  :(

1982

  • Junior Playmaker
  • **
  • Posts: 71
    • View Profile
Re: How to keep energy bar toolkit value after restart/load level
« Reply #4 on: June 13, 2014, 08:41:34 AM »
You need to save your energy value into Playmaker 'global variable' to make it stay between the scenes.

I am not familiar with energy bar tool kit, but it would be maybe easier to make energy management completely with Playmaker.

ghost010

  • Junior Playmaker
  • **
  • Posts: 51
    • View Profile
Re: How to keep energy bar toolkit value after restart/load level
« Reply #5 on: June 15, 2014, 02:13:01 PM »
You need to save your energy value into Playmaker 'global variable' to make it stay between the scenes.

I am not familiar with energy bar tool kit, but it would be maybe easier to make energy management completely with Playmaker.

Are you sure this will save between scenes?

Anyhoo,another way to do this is saving it in player prefs.

1982

  • Junior Playmaker
  • **
  • Posts: 71
    • View Profile
Re: How to keep energy bar toolkit value after restart/load level
« Reply #6 on: June 15, 2014, 03:13:04 PM »
Yes it will stay between scenes, it resets when you close the application.