PlayMaker Help & Tips > PlayMaker Help

Setting FSM Action property when spawning from prefab.

(1/1)

izzycoding:
Hi,

Is there a way I can set the FSM Component of a Send Event action when spawning from a prefab?
I currently have a ball that is spawned, and as the action in question needs to send an event to a specific FSM I need to be able to set that when spawning as currently the action does not have one set when it is created.

Regards,

Vallar:
Yes, you can set the exact FSM Component you are sending to.

You can choose in the Send Event the "Event Target" parameter as "Game Object FSM" and from there there will be an option to choose the "Game Object" and then the "FSM Name" from a drop down menu or you can choose the "Event Target" parameter as "FSMComponent".

I hope this helps.

izzycoding:
Hi,

Does this work and keep details on a prefab when pointing to an Object that is not part of the prefab?
What ever I do my ball prefab just leaves that action parameter blank. So I am wondering how to set that when I create the ball from the prefab?

Regards,

Navigation

[0] Message Index

Go to full version