playMaker

Author Topic: I must be thick!  (Read 1889 times)

richardh

  • Junior Playmaker
  • **
  • Posts: 97
    • View Profile
I must be thick!
« on: December 28, 2014, 01: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

Pawel

  • Junior Playmaker
  • **
  • Posts: 93
    • View Profile
Re: I must be thick!
« Reply #1 on: December 28, 2014, 04: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..

Pawel

  • Junior Playmaker
  • **
  • Posts: 93
    • View Profile
Re: I must be thick!
« Reply #2 on: December 31, 2014, 10:19:44 AM »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14342
  • Official Playmaker Support
    • View Profile
Re: I must be thick!
« Reply #3 on: January 16, 2015, 01: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

richardh

  • Junior Playmaker
  • **
  • Posts: 97
    • View Profile
Re: I must be thick!
« Reply #4 on: January 22, 2015, 05: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



jdupreez

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Re: I must be thick!
« Reply #5 on: January 22, 2015, 09:08:30 PM »
I also had problems with text output. This video helped me
http://youtu.be/BmEjRqFtix0