Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: xhidnoda on February 24, 2014, 09:18:59 PM
-
Hi everybody!!!
Maybe a noob question, but anyone know hot to chage a sprite of a spritecolletion every (event happen)?
Like a score system, i like to chage image number 1 to number 2 and 3(...).
Can help?
-
Hi,
Actually, I would suggest you have all your image in your sprite collection and then sawp that image on the sprite itself as opposed as in the collection itself.
bye,
Jean
-
Hi Jean!
I think not express well...i mean change the image sprite of just one spriteColletion.
I want to change the score when player hit someting.
-
Hi,
then you would use a proper text based sprite with a atlased font for this isn't it? what is your score gameobject made of?
bye,
Jean
-
Hi
I use a 2D Toolkit font. Can you make a example for me...i try try but, i don't not how to make this score system.
:'(
-
Nothing? :o
I try with this action: "tk 2d Text Mesh set Text".
Is correct this action to make a score system based in 2D toolkit?
-
Hi,
yesm that's the one to use to set the text on 2t2d, is it not working?
bye,
Jean
-
I don't not if is working...because can't test.
Here is my FSM setup.
Can you help?
-
Hi,
I am confused. Why can't you test this?
bye,
Jean
-
1. Is its the best way to make score?
2. I can't test, because a have a problem when try to drag and drop the 2score game object" into the tk 2d textmesh. (see the image, have error).
thanks!
-
Here is the error (image).
:-[
-
Hi,
Drag Contador on the gameobject field. Don't drag the component itself. else use the action "get Owner" store this is a GamObject variable that you use in this action as opposed to try to drag and drop.
bye,
Jean
-
sorry...but I do not understand.
1. Score is the textMesh game object (2d toolkit).
2. Contador is FSM where i try to make that score update number every time.
3. When drag and drop Score into Tk 2d Text Mesh set Text action...show the pop-up window and let me choose (Get property, set property, etc.)
I want to update the text Mesh (Score). How to do this? Sorry my ignorance on this, and thanks to help me.
how do I do?
-
nothing????
;D
-
Is any place with toturial of how to make a score sytem? 2d toolkit or gui text (native of unity) i don't care....i just to make happen this :(
-
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
-
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
-
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.
-
Yes...is work perfect with text mesh action....
But, why don't work into a prefab?
-
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
-
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.
-
Hi,
don't hesitate to share things, it's always welcomed.
bye,
Jean
-
Flappy Planes - All FSM source here. Enjoy
http://hutonggames.com/playmakerforum/index.php?topic=6841.0