Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Athanateus on June 30, 2014, 11:01:24 AM

Title: Just started... Why is the FSM disabled with created objects? [SOLVED]
Post by: Athanateus on June 30, 2014, 11:01:24 AM
Hi there

I'm trying to learn how to use Playmaker/Unity and in particular I'm trying to create an endless pile of cubes which break upon mouse click on the cube and at the same time spawn a new cube above the camera view.

I think I have most of this down using a prefab object which spawns a clone of itself; but the FSM for that clone is disabled. I have no idea why and can't seem to find any options to change this?

Can anyone help?

I suspect its pretty obvious - but I just cant see.
Title: Re: Just started... Why is the FSM disabled with created objects?
Post by: Alex Chouls on June 30, 2014, 01:09:48 PM
If the FSM is enabled on the prefab it should be enabled on the created instance...

Quote
I think I have most of this down using a prefab object which spawns a clone of itself; but the FSM for that clone is disabled. I have no idea why and can't seem to find any options to change this?

Are you sure you're looking at the clone and not the Prefab? A prefab will say DISABLED at runtime because it's not a scene object and isn't running...

Can you post a screenshot or video?
Title: Re: Just started... Why is the FSM disabled with created objects?
Post by: Athanateus on June 30, 2014, 03:14:37 PM
no probs (although its been so long since I used a forum like this in anger I may be missing some tricks) 

I posted up some images on my blog as well as a longer description here:

http://www.gamesasaservice.net/blog/time-learn-use-unity/ (http://www.gamesasaservice.net/blog/time-learn-use-unity/)

I've posted URLS to the images direct here too. This first one is what I get when I select to prefab.

(http://www.gamesasaservice.net/wp-content/uploads/2014/06/Prefab-selected.png)

and then when I play in the game screen I get this:

(http://www.gamesasaservice.net/wp-content/uploads/2014/06/gamemode.png)

Does that help? Despite 16 years in the industry I've always be the strategy guy rather than the game maker so sorry if I come across as dense.
Title: Re: Just started... Why is the FSM disabled with created objects?
Post by: Alex Chouls on June 30, 2014, 03:49:48 PM
Create Object should reference the Prefab - it looks like it's referencing an instance in the scene (which is probably getting disabled and then copied).
Title: Re: Just started... Why is the FSM disabled with created objects?
Post by: Athanateus on July 01, 2014, 03:38:57 AM
Ah! ok will try that now
Title: Re: Just started... Why is the FSM disabled with created objects?
Post by: Athanateus on July 01, 2014, 08:58:55 AM
As far as I can tell the 'Create Object' does reference the prefab... and I can't see anything which would explain why its properties wouldn't replicate in the clone

Could you tell me what I should be looking for?
Title: Re: Just started... Why is the FSM disabled with created objects?
Post by: jess84 on July 01, 2014, 09:15:17 AM
In your Create Object action, you aren't referencing a prefab - which is why it says "... (clone)" in that action.  You should instead drag the prefab you want to create the object from onto your action. (e.g. from the Project window - *not* from the Hierachy window).

Also, it's probably not best practice to have those actions on one state if it's not an Action Sequence - it looks like you're simulataneously destroying your object, and trying to enable it, (and trying to spawn a new object).  I'm not sure what you're trying to achieve, but you should probably set that state to Action Sequence and order your 3 actions in the order you'd logically want it to process.
Title: Re: Just started... Why is the FSM disabled with created objects? [SOLVED]
Post by: Athanateus on July 01, 2014, 10:26:14 AM
Thanks Jess84... The 'enable' was a niave attempt to fix the problem...

Restarting the process and actually getting rid of the prefab solved the problem... trying to do too many things in one step was the issue.

Thanks
Title: Re: Just started... Why is the FSM disabled with created objects? [SOLVED]
Post by: buggie on October 21, 2018, 05:34:26 AM
I ran into the same issue, the only thing was that my instances where referencing a prefab, but for whatever reason it would spawn the prefab as all scripts disabled.{paymaker, c#, and PlyBlox} I solved this by duplicating the prefab and having the first prefab reference the second one, and the second one reference the first. This solved it. They now spawn correctly.