Playmaker Forum

PlayMaker News => General Discussion => Topic started by: richardh on December 28, 2014, 03:43:08 PM

Title: I must be thick!
Post by: richardh on December 28, 2014, 03:43:08 PM
I've watched loads of (probably ALL) tuts for playmaker and they all seem logical and straight forward. But I've tried to create a simple FSM and fail at every turn! For 2 hours I've been trying to get a GUI text to output what the mouse is clicking on (tag, or the gameObject name)  and I just cannot work out how to do it.
Very frustrated and disappointed in myself for not having the brains to work it out.

All I want to do is click on a cube or a plain and have it change the GUI text.

Further, this isn't even what i set out to do! I wanted to create a pickup object FSM so that when the mouse is clicked and held it picks up a 'pickupable' object and then drops it when the mouse is released. I've seen the threads on this forum which describe the same scenario but alas i cannot duplicate it.

I don't have much faith in mastering playmaker and that's down to my inept brain and not the fantastic playmaker product.

sigh!

(Spleen vented) :'(

ta
Title: Re: I must be thick!
Post by: Pawel on December 28, 2014, 06:12:19 PM
If you are using Unity 4.6 and later, you are probably watching wrong tutorials. Text treatment has changed starting with this version. Now you need to deal with Canvas... seems that Playmaker has some catching up. I no longer as straight forward as it used to be. However, it seems to be more flexible and powerful. For example I was able to use real time variable updated text in 3d space, which I don't think was possible before..
Title: Re: I must be thick!
Post by: Pawel on December 31, 2014, 12:19:44 PM
Here is how you output text:

http://hutonggames.com/playmakerforum/index.php?topic=9084.msg43501#msg43501

Title: Re: I must be thick!
Post by: jeanfabre on January 16, 2015, 03:13:11 PM
Hi,

 Don't panic. Learning the hard way is the best way :) It works for me, I sometimes bang my head on simple things, frustrating, but part of the deal with you want to developer 3d games :)

maybe you should first clarify:

-- Do you want to use the old Unity GUI system or the brand new one available in Untiy 4.6?

-- have you studied the samples provided by PlayMaker, there are a lot of examples on exactly what you want to achieve. Let me know if you need directions on this.

 Bye,

 Jean
Title: Re: I must be thick!
Post by: richardh on January 22, 2015, 07:58:25 PM
Hi Jean
I'm still having trouble understanding GUI text and how to implement it. The tuts I've looked at don't seem to show the same setup I have.

I don't understand why there is a Component > UI > Text, yet you can add text components (Text, Text Mesh, TextGUI) to a game object. Then you have Canvas > Text ... They just seem to be all over the place with a variety of places to set text yet most don't show up on the screen.

Surely there is an upto date tutorial on GUI text !

At the moment I have a trigger that starts a timer, this timer is a stored as a float and the float is converted and stored in a string variable. I set GUI Text state which says 'GameObject needs a GUIText component' which i duly add. The GUIText component is created but nothing shows onscreen (no text even if I set some default text). on starting the game the stored float & string variable work fine - the numbers run down as a timer should. But I can't get this string variable to output onscreen.

What am I doing wrong?

I have the working string variable, I just can't get this to output to the screen.

thanks


Title: Re: I must be thick!
Post by: jdupreez on January 22, 2015, 11:08:30 PM
I also had problems with text output. This video helped me
http://youtu.be/BmEjRqFtix0 (http://youtu.be/BmEjRqFtix0)