playMaker

Author Topic: Action to Break Prefab Instance?  (Read 1714 times)

beowulfkaine

  • Playmaker Newbie
  • *
  • Posts: 47
Action to Break Prefab Instance?
« 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?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Action to Break Prefab Instance?
« Reply #1 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?

beowulfkaine

  • Playmaker Newbie
  • *
  • Posts: 47
Re: Action to Break Prefab Instance?
« Reply #2 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.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Action to Break Prefab Instance?
« Reply #3 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.