playMaker

Author Topic: Simple score system.  (Read 1617 times)

kuba3000

  • Playmaker Newbie
  • *
  • Posts: 4
Simple score system.
« on: April 04, 2014, 10:11:23 AM »
Hello everyone,

Just to clarify, I am a total newbie when it comes to playmaker. I need help in creating a simple point system which adds points to the onscreen gui text whenever the bullet fired from the cannon hits the object.
Also would it be able to assign different amount of points to the certain objects? I want closest object to add, lets say, 1 point, whereas the furthest gives 3.

Thank you for any help. :)

Redhawk

  • Junior Playmaker
  • **
  • Posts: 57
Re: Simple score system.
« Reply #1 on: April 04, 2014, 02:09:50 PM »
Not specific for Playmaker, but typically I would assign an empty Game object that keeps track of all these types of items.  When your "item/collider" is being destroyed, you would send a message to your "Score Keeper" telling it that it needs to add points...maybe float myScore=0.0f; then ScoreKeeper.myScore +=200f;  That way you have a single object that keeps track of all the stuff.  Then your Gui would also access the ScoreKeeper and just display whatever myScore is.

Something that might help understand the process as a Whole is this handy little video that Unity put out.  I think if you watch it, it will help you gain an overarching understanding.

« Last Edit: April 04, 2014, 02:13:09 PM by Redhawk »