Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: beowulfkaine on July 19, 2017, 04:47:15 PM

Title: Action to Break Prefab Instance?
Post by: beowulfkaine on July 19, 2017, 04:47:15 PM
Hello! I want to know if there is an action or way to break a prefab instance after a certain time or (xxxx) happens?
Title: Re: Action to Break Prefab Instance?
Post by: djaydino on July 19, 2017, 08:21:42 PM
Hi,
As far as i know you can't break an prefab instance @runtime.

Why do you want to break it?
Title: Re: Action to Break Prefab Instance?
Post by: beowulfkaine on July 21, 2017, 12:22:32 AM
Essentially what I am doing is firing a clone of an arrow with the ability to change what kind of arrow it is for the next one.  However, when I select the next type of arrow, it changes the original as well.

Example, Arrow is selected as fire arrow, its fired, then an ice arrow is selected quickly, the new arrow turns into an ice arrow and is ready to fire, however, the original fire arrow has changed mid flight into an ice arrow.
Title: Re: Action to Break Prefab Instance?
Post by: djaydino on July 21, 2017, 08:21:55 AM
Hi,
How are you changing the arrows (fire, ice,..)
Can you show your fsm/states/actions?

The flying arrow might still be selected (in a variable)
or maybe you are broadcasting an event?

I think i answered you on another post.
it is better to use pooling.
But you can do this with creating the object every time.