playMaker

Author Topic: MOUSE EVEN on childs objects !!!  (Read 2467 times)

gabrielkevers

  • Playmaker Newbie
  • *
  • Posts: 3
MOUSE EVEN on childs objects !!!
« on: September 11, 2012, 11:20:04 AM »
hello,

I have an object that contains many more childs objects. if I take the basic example: "OnMouseDown material set to Red" OnMouseUp material set to Green " on a root objet the even is receved by PlayMaker.

But when I apply the same "State Machine" on a child my object when the event is not detected ;-(

Please help me

thank gabriel
« Last Edit: September 11, 2012, 11:45:38 AM by gabrielkevers »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: MOUSE EVEN on childs objects !!!
« Reply #1 on: September 13, 2012, 06:31:43 AM »
Hi,

 I don't think mouse events bubble up the gameObject hierarchy, at least from what I can test here.

 so your option would be to have a fsm on your child that receive the mouse event and send a custom event like "MOUSE DOWN ON CHILD" then parents would listen to both the "MOUSE DOWN" build int event AND the "MOUSE DOWN ON CHILD"

Does that make sense?

bye,

 Jean

gabrielkevers

  • Playmaker Newbie
  • *
  • Posts: 3
Re: MOUSE EVEN on childs objects !!!
« Reply #2 on: September 14, 2012, 09:30:54 AM »
Hi Jean,
No I do not think, with "Raycast api and Input api" my code receive the event from the child object! I do not see why "GameMaker" no ?

it is very simple to to make, with a management state machine is maximun 20 lines of code  .

But for GameMaker, one simple problems are too complicated  ;)  or little bug ?  ;-)

Thank you, Jean

PS: Jean is a frensh name no, your are french ?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: MOUSE EVEN on childs objects !!!
« Reply #3 on: September 15, 2012, 04:38:05 AM »
Hi,

 yes, I am french. you too?!?

 Could you share the code you are using that actually bubbles up mouse events? that would help me find a way to do it similarly to your code in playmaker.

bye,

 Jean

gabrielkevers

  • Playmaker Newbie
  • *
  • Posts: 3
Re: MOUSE EVEN on childs objects !!!
« Reply #4 on: September 17, 2012, 04:36:40 AM »
Bonjour,

je suis Belge on est voisin ;-)

je suis de Liège, tu voulais quoi exactement ?

bian à toi
Gabriel

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: MOUSE EVEN on childs objects !!!
« Reply #5 on: September 18, 2012, 07:13:50 AM »
Salut :)

 Si tu peux partager ton code qui fait ce que tu dit, je pourrais mieux voir si je peux le faire avec PlayMaker.

a plus,

 Jean