playMaker

Author Topic: how to add socre system without scripting  (Read 3007 times)

Robert Foster

  • Playmaker Newbie
  • *
  • Posts: 36
how to add socre system without scripting
« on: January 15, 2012, 11:50:22 PM »
ok i frgure out  but there some wrong  it keep add be 2  and need a better way to do this  tip or tricks for a better 2 socre system  :)

Red

  • Hero Member
  • *****
  • Posts: 563
Re: how to add socre system without scripting
« Reply #1 on: January 16, 2012, 01:30:29 PM »
what i have done for things like this is to make an empty game object and make the appropriate variables there (i.e. score 1, score 2)

you could then go about it different ways. one way would be to have an "add 1 to score 1" and "add 1 to score 2" global events and have them in the score keeper and then whenever there is a score update, have the appropriate object send event.

Robert Foster

  • Playmaker Newbie
  • *
  • Posts: 36
Re: how to add socre system without scripting
« Reply #2 on: January 16, 2012, 05:57:51 PM »
can you make a Template for me i have a gui on my  and tkank you  for the tip  i forget a lot of thing some time i know scripting  do it in script little bit faster oh a have a tutorial on fps made with playmaker frist i need to make simple game like memory game ,shoting ball game ,pong game ,ei  don't writing  make a Template demo please  i kown it hard to write a tutorial on here  it will be good some demo of it . thank you for the push  :)

Red

  • Hero Member
  • *****
  • Posts: 563
Re: how to add socre system without scripting
« Reply #3 on: June 16, 2012, 10:52:54 AM »
Sorry about the tardiness... here's a package that outlines what i was trying to do... you should be able to import it to your project but i would strongly suggest a brand new or otherwise empty project just in case there are any conflicts.

this should showcase a bit of what i mean though about calling events from another FSM, in this case about telling it to add 1 to the score.

export it and run it to see it working... the scores are visible in the inspector of unity so best to not go fullscreen if you want to see the scores add up. took me about 10 minutes so that should show how it's easy to do. also, the "next frame event" is added in there because sometimes i've noticed that if you just use "finished" it will trigger the finished event before you can trigger the actions in it (mostly i've noticed it doing that more on states that are calculation heavy... so, this is a way to tell PM "hey, ONLY finish this event once all the events have completed their actions." i don't think this is a bug of PM or anything but it's still a good practice imo to be specific... these are computers we're dealing with and they aren't terribly smart. they will only do what we tell them to do and the cannot intuit what we mean so, best to be specific whenever you can.)

http://fantasy21.comyr.com/Test_Score_counter_object_for_forums.unitypackage
« Last Edit: June 16, 2012, 10:55:11 AM by Red »