Playmaker Forum
PlayMaker News => General Discussion => Topic started by: Handrews on December 03, 2020, 10:40:20 AM
-
I know there is an action called "Set Parent", but it takes a moment to attach the object as child after create it, and i need that the objects gets created instantly as a child...basically the object i create from a prefab have an fsm that disables an fsm from the parent object, but in the moment of the creation the object dosent ve any parent, so the fsm don`t work. I need that the objects disables instantlly the fsm of the parent object.
-
Hi.
Not Sure what you are trying to do, but even in c# you still need to create and then set parent.
What you can try is, on the prefab have a event to start the fsm.
like this :
Create (store the created object)
Set Parent
Send Event By Name (start Fsm)
on the prefab set the 'start' state empty then set a Global Transition to where you want to start (start Fsm)
-
As far as i know, instantiate has Parent as one of the parameters, but as Djaydino said, it creates and object and then it assigns him a parent. Give you FSM's time to breath, for exactly that reason most of my stuff have "Activation Wait" of usually at least 0.1.
-
Create object 2 on eco