playMaker

Author Topic: How to change sprite (2D toolkit + Playmaker) - Score System[SOLVED]  (Read 8117 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to change sprite (2D toolkit + Playmaker) - Score System
« Reply #15 on: March 11, 2014, 06:37:11 AM »
Hi,

 You are not far, once you selected "Set property", you can then pick up the "text" property of that Tk2D Mesh and set it to any string you like.

bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to change sprite (2D toolkit + Playmaker) - Score System
« Reply #16 on: March 12, 2014, 04:43:36 AM »
Hi,

 Are you struggling with keeping track of a score in your game or actually not able to show it on screen?

 if you use unity GUI text, simple use the action "Set Gui Text" and you will be able to change the test shown on that GUI Text.

 now, if you have an int as score, you will need to convert it to a string using the action "Convert Int to String". This is maybe your problem right?

 Have a look at the m2h samples, plenty of examples to keep track of scores and even store the best score in the player prefs.

https://hutonggames.fogbugz.com/default.asp?W890

https://hutonggames.fogbugz.com/default.asp?W895

bye,

 Jean

xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: How to change sprite (2D toolkit + Playmaker) - Score System
« Reply #17 on: March 12, 2014, 02:25:07 PM »
Hi Jean
You've seen my pictures are send?
I use 2D toolkit (2D textMesh), and yes also GUI Text.
I found what is the problem.
When you make a prefab of you "Score game object"...the action "set property" is lose his target and all setup. I'm don't why. IS A BUG?

Now is works...with the GUI Text, but out of prefab.
In this night, i try to test with 2D textMesh of 2D toolkit, and will tell you is work or not.


xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: How to change sprite (2D toolkit + Playmaker) - Score System
« Reply #18 on: March 12, 2014, 09:40:59 PM »
Yes...is work perfect with text mesh action....
But, why don't work into a prefab?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to change sprite (2D toolkit + Playmaker) - Score System
« Reply #19 on: March 13, 2014, 07:16:55 AM »
hi,

 because a prefab sitting in the project folder is just an asset to be used in a scene, it's very important to grasp this concepts, because this is how Unity is working, not something PlayMaker has control over.

bye,

 Jean

xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: How to change sprite (2D toolkit + Playmaker) - Score System
« Reply #20 on: March 13, 2014, 08:34:57 AM »
Oh....i get that
Many thanks Jean!
So, the solution of this, is make a fsm on Game Object that have a trigger listener and then if hit, send a global event to "Contador" game Object.

If any other user follow this thread, i will put the source here when the project is done.



jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to change sprite (2D toolkit + Playmaker) - Score System
« Reply #21 on: March 14, 2014, 06:44:09 AM »
Hi,

 don't hesitate to share things, it's always welcomed.

bye,

 Jean

xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: How to change sprite (2D toolkit + Playmaker) - Score System[SOLVED]
« Reply #22 on: March 29, 2014, 02:46:36 PM »
Flappy Planes - All FSM source here. Enjoy
http://hutonggames.com/playmakerforum/index.php?topic=6841.0