PlayMaker Help & Tips > PlayMaker Help

Dragging NGUI Label or Button to GameObject fields[SOLVED]

(1/2) > >>

MrAdventure:
Hello,

I am trying to make a stacked inventory button with a text label that gets decremented with use.

First, when setting up, I can't find the file UIEventsToPlayMakerFSM, mentioned repeatedly in the forums. Is this an old one, replaced by NGUIEventForwarder?

I placed NGUIEventForwarder on my button, and dragged the FSM running on another game object onto the field in NGUIEventForwarder.

I had read that I should be able to drag my button, labels, etc, onto actions and variables on my FSM. Doing this in the variable pane does nothing. Doing it onto a GameObject slot in an action brings up a context menu with Get Property, Set Property, Send Message, and Cancel. I can't ever drop the object into a field directly.

Thanks for any advice. Happy Holidays!

Victor

jeanfabre:
Hi,

 Use this package:

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

 Instructions on event listening are on that wiki page as well. Come back to this thread if you have trouble still.

bye,

 Jean

MrAdventure:
Hi Jean,

Thanks so much for responding. I will start working on this shortly, but for the purpose of clarity please answer the following:

I now have a Playmaker NGUI folder and a Playmaker NGUI Scripts folder. Should I be keeping both of these?

If so, should I also have both Playmaker NGUI Delegates and NGUI Playmaker Proxy in the scene? Does it matter where they are (root is ok?)

It appears that NGuiEventsToPlaymakerFsmEvents and NGuiEventForwarder both go on the NGUI button that will activate other GameObjects, is this correct? If not, am I still using both, and does one go somewhere else?

Thanks for the help!

Victor

MrAdventure:
Hi Jean,

My above questions are still in my mind, but I wanted to update you with my current status.

I got the "green" connection on my button, and it seems to be connected to my FSM.

I am still unsure how to drag labels to the FSM. Specifically, I am trying to drag a Label over to an NGUI Update Label Text action. It still only gives me the Get Property and Set Property context menu. The field won't accept my Label.

Thanks again,

Victor

jeanfabre:
Hi,

"NguiUpdateLabelText" action works by itself and its game object property, that's where you define what game object it targets.

 dragging a ngui label component will prompt you with a "Get/Set property" wizard, but MAKE SURE you drag the component, not the gameobject, else it will target the gameobject itself and not the ngui label.


Bye,

 Jean

Navigation

[0] Message Index

[#] Next page

Go to full version