playMaker

Author Topic: Daikon forge Gui doesn't send event to playmaker![SOLVED]  (Read 3692 times)

busta5000

  • Playmaker Newbie
  • *
  • Posts: 8
Daikon forge Gui doesn't send event to playmaker![SOLVED]
« on: May 12, 2014, 04:49:55 PM »
Hey I used playmaker to do the buttons but the gui editing was time wasting specially if I have a deadline. Anyways I am using Daikon forge gui its easy to use but problem is integrating it with playmaker I mean the most basic thing. I did a really simple example but that even didn't work.

Here is what I did to test if they work together
1.Created cube.
2. Created daikon forge GUI ROOT . In the border I created a button & added playmaker FSM for that button.
3.used 1 state for a basic test which all it does is destroy the cube.
after I click play & click the button nothing happens though it works if I ignored daikon forge & used playmaker gui on the main camera & not the UI ROOT.
So please can you explain to me how can I use daikon forge & playmaker together.
« Last Edit: May 14, 2014, 10:42:06 AM by jeanfabre »

kuolema

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Daikon forge Gui doesn't send event to playmaker!
« Reply #1 on: May 12, 2014, 09:55:06 PM »
For DF-GUI, it should be really easy, and I think you're just missing the click listener.

State 1: DFGUI Control Click Event
For this state, you can use owner since you're putting the FSM directly on the button inside UI Root, and then you just need to broadcast the event if it's consumed in another FSM somewhere in your scene. From that, add a transition back to this state with that event so that the DF GUI click listener will pick up any additional clicks.

I usually have 2 states for my buttons though. The first is the listener as described, but then I have another state that plays sounds and then I call events directly and can add additional logic in this state. When it's done, it just transitions back to the first state where it listens for additional clicks.

Hope this helps!

busta5000

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Daikon forge Gui doesn't send event to playmaker!
« Reply #2 on: May 13, 2014, 12:16:29 AM »
Daikon forge doesn't have anything to broadcast itself I already tried using event Driven Property binding but that didn't work. In playmaker there is a method to broadcast set & get. Daikon forge has event driven property binding but that doesn't broadcast either. I hope you can give me specifics please as I said the example is very basic its a test

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Daikon forge Gui doesn't send event to playmaker!
« Reply #3 on: May 13, 2014, 08:07:39 AM »
Hi,

 you have to use the given set of actions to listent locally to user actions on a given ui element, typically make use of :

DFGUI Control Click Event
DFGUI Control Mouse xxx Event

They work, I am using them all the time.

bye,

 Jean

busta5000

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Daikon forge Gui doesn't send event to playmaker!
« Reply #4 on: May 13, 2014, 04:17:28 PM »
Finally found the control click event. The problem was that I didn't download the actions from daikon forge extras. The problem is that those guys didn't even know they had the actions they said we have no idea contact playmaker!
« Last Edit: May 13, 2014, 05:31:30 PM by busta5000 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Daikon forge Gui doesn't send event to playmaker!
« Reply #5 on: May 14, 2014, 12:21:49 AM »
Hi,

 I am in contact with DFGUI yesterday, I actually asked them to redirect all PlayMaker request on this forum. So it's not that they don't know, it's simply that they are not acquainted with PlayMaker enough to provide meaningful help.

Bye,

 Jean

busta5000

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Daikon forge Gui doesn't send event to playmaker!
« Reply #6 on: May 14, 2014, 07:11:45 AM »
Hey I have captured a 1 minute video that shows what I have done.

I have used control click event yet nothing happens if you watch the video you will notice there are 2 states
first state is the listener the second state is the action that is done when clicked. The arrow button when clicked should switch from Main Camera to Camera which is a second camera. Normally this would work without DFGUI but it doesn't work so I'm not sure if I missed something I do not see anything under control so can you tell me what is supposed to be in control! Also can you explain in more detail what is missing.

https://dl.dropboxusercontent.com/u/1670933/1.avi

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Daikon forge Gui doesn't send event to playmaker!
« Reply #7 on: May 14, 2014, 08:07:50 AM »
Hi,

 I don't know what you are doing wrong there, but here It's all working fine:

1: create a clean DFGUI button
2: add an fsm to that button gameobject
3: Create an event "CLICK"
4: On the start state add the action "DFGU Control Click Event"
5: on that action use "CLICK" for the "Send event"
6: add "CLICK" as a transition of this state and move to another state

Play the scene, click on the button int he game view and it works the "CLICK" event is fire.

Bye,

 Jean

busta5000

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Daikon forge Gui doesn't send event to playmaker!
« Reply #8 on: May 14, 2014, 08:56:41 AM »
Yay Finally worked I'm not sure whats the problem I really do not know I have done nothing to change it maybe when running some errors caused things to stop working. Like 2 exact copies of a button are on screen yet one works & the other didn't work! Anyways now the button works thank you very much for your time  ;).