playMaker

Author Topic: Reward screen  (Read 117 times)

unearthly

  • Junior Playmaker
  • **
  • Posts: 57
    • View Profile
Reward screen
« on: February 11, 2019, 01:21:23 AM »
Hi Guys

I have set up a basic reward system wherein when the player defeats an AI they receive one of three trophies depending on how much health they retained.

Wondering how I might list those trophy wins from each fight level completed, in a separate scene which updates each time the player finishes a level?

Regards Charles

krmko

  • Beta Group
  • Hero Member
  • *
  • Posts: 884
    • View Profile
    • Fat Pug Studio
Re: Reward screen
« Reply #1 on: February 11, 2019, 02:00:25 AM »
Save them to hash table and have the scene display it.

Keys in the hash table will be level numbers and values will be trophies. Or an array, index 0 will be level 1 and so on.

unearthly

  • Junior Playmaker
  • **
  • Posts: 57
    • View Profile
Re: Reward screen
« Reply #2 on: February 11, 2019, 09:02:52 PM »
Hi krmko

Thanks for your response. Don't have much idea how to proceed, maybe if your images came through my end that would help.

You are saying set up the Hash Table in the scene where I want to display the players accrued trophies.

Do I use a Play Maker Hash Table Proxy script? How do I get the players trophy when it's obtained in another level to that scene? The only way I know to send data one scene to another is using global variables.

krmko

  • Beta Group
  • Hero Member
  • *
  • Posts: 884
    • View Profile
    • Fat Pug Studio
Re: Reward screen
« Reply #3 on: February 12, 2019, 02:49:02 AM »
I can post few images, but in a few days when i find the time.

Place the object that will hold the array/hash list with data in the starting scene and put don't destroy on load on it. That way it will permanently stay between scenes so you can easily fill it with data and load data from it without having to use global variables.

unearthly

  • Junior Playmaker
  • **
  • Posts: 57
    • View Profile
Re: Reward screen
« Reply #4 on: February 12, 2019, 04:10:50 AM »
Thanks krmko

I would appreciate a few images of FSM's, look out for them later in the week. Thought of using a don't destroy on load, but still can't see how to have other FSM's access it at run time.

I have attached an image of my rewards screen, it's a 2D game.

Regards Charles
« Last Edit: February 12, 2019, 02:53:31 PM by unearthly »