Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: djaydino on November 03, 2016, 09:01:27 AM

Title: Ugui Detect Pressed button
Post by: djaydino on November 03, 2016, 09:01:27 AM
Hi,
Is there a way with Ugui to detect which button is pressed?

So i have multiple buttons in Ugui sending to the same event and i want to detect which button was pressed.
After that, i want to check it in an array and then i will use the index nr for some other things.

I don't want to multiple events because there are 100+ buttons and the fsm wil get very messy.
Title: Re: Ugui Detect Pressed button
Post by: Kemono on November 03, 2016, 09:23:02 AM
Can you do it with Send Event Properties and Get Event Properties?
In case the button's FSM sends event to gamecontroller's FSM.
Title: Re: Ugui Detect Pressed button
Post by: djaydino on November 03, 2016, 10:44:56 AM
Hi,
I think you got me into the right direction, not with 'Send Event Properties' or 'Get Event Properties'.
But with 'Get Event Info'
i can get the gameobject under 'Send By Gameobject'
Then find the object in an array and i get the index nr that i need..

will test this and let you know if this works
Title: Re: Ugui Detect Pressed button
Post by: djaydino on November 08, 2016, 03:14:23 PM
Hi,
the playmaker Ugui proxy component does send an event but it is not detected by 'Get Event Info' so i had to make an fsm on each button when it was clicked to send an event and then it works.