playMaker

Author Topic: Gui Label: Drawing a fix picture  (Read 2119 times)

Sly

  • Full Member
  • ***
  • Posts: 123
Gui Label: Drawing a fix picture
« on: July 29, 2013, 02:34:08 PM »
Hello,
I've got a question about Gui Label.
I'm using it, but I don't know if it's the best action to use in my playmaker script.

The thing I want is to show a picture on the gameobject on the screen. By on the screen I mean the picture need to be on the gameobject but not moving with camera or the player. In one word, a static one.

How I can do that? Because I'm using a Gui Label but the picture is moving with the camera/player.

Thanks in advance

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Gui Label: Drawing a fix picture
« Reply #1 on: July 30, 2013, 06:23:23 AM »
Hi,

 If I understand your need correctly, you can use GUILayout Begin Area Follow Object for this:

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

bye,

 Jean

Sly

  • Full Member
  • ***
  • Posts: 123
Re: Gui Label: Drawing a fix picture
« Reply #2 on: July 30, 2013, 08:26:53 AM »
Thanks for the reply.
The thing is I need to do generic game object, that's mean I don't want to link it to an object but to itself. If I do that, I'm gonna spend a lot's of time for each triggerzone.

Basicely, I ve got a triggerzone. When the player trigger it a message appear "Press E to use it" (this part is done) and I need an arrow over it to show the door, like in old 2d video game.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Gui Label: Drawing a fix picture
« Reply #3 on: July 30, 2013, 04:07:33 PM »
Hi,

 yes, that's fine. Simply have a dummy GameObject, that act as the reference for the gui to follow, AND move that dummy to the door or what ever object you want to point.

 With this level of indirection, you can point to ANY object in your scene, you simply need to match it's position.

 Does that make sense?

Typically ( I had to do somethig like that earlier this year), you should have a global event like "HILITE ME" or something, and the arrow dummy, which also host the gui definition, implements that global event, get the gameObject that fired the event, and it simply set it's own position to match that gameObject. You can also pass a position in the event data if you want to have some offset.

bye,

 Jean

bye,

 Jean