playMaker

Author Topic: Some work... Some don't  (Read 1994 times)

Chippy

  • Playmaker Newbie
  • *
  • Posts: 7
Some work... Some don't
« on: May 19, 2013, 06:15:08 PM »
Hello,

I have been really enjoying learning Playmeker. It isn't easy though... I've attached a Unity file with some stuff I've done using Playmaker. Basically, you click the blocks, they change into a sphere, and then they disappear. I am however baffled as to why, some blocks work and some don't. They are 100% identical in every way. I'm certain there's something I'm overlooking but most likely it is my lack of knowledge about something. Could anyone help educate me as to what's wrong here? Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Some work... Some don't
« Reply #1 on: May 20, 2013, 01:18:20 AM »
Hi,

 First of all. Are you using prefabs? or are you duplicating codes and gameObjects? I recommand Prefabs if your objects are all identical.

also, to share a scene, you need to package it ( using Unity export system), sending the *.unity from the asset folder scene is not enough.

 Bye,

 Jean

Chippy

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Some work... Some don't
« Reply #2 on: May 20, 2013, 11:22:52 AM »
Thank you for replying Jean. I guess I forgot to also mention I'm new to Unity as well. Ok, hopefully this package works with the scene I attached earlier. And to clearify, I drag/dropped each block prefab into the scene and offset them each by hand as I noticed that duplicating them in the scene would sometimes work and sometimes not work and I'm not sure why that is either.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Some work... Some don't
« Reply #3 on: May 21, 2013, 03:13:29 AM »
Hi,

 I don't think it works at all isn't it?

the problem is the following. you do a mouse pick, and you catch the "cube" that is a child of the GameObject that feature the Fsm, so you are trying to send an event to an object that doesn't have any fsm.

 instead you need to send it to the parent of the gameObject you hit, redirecting calls to its parent from within the cube and sphere.

 And you should not have a collider on the Main GameObject, it is in conflict with the childs that also have colliders.

That's where all the problems are I think. Also when you send event, simply choose "Specify Game Object" this prevents hardocing the fsm name, especially if you only have one fsm on that gameobject.

bye,

 Jean