playMaker

Author Topic: The correct way to destroy projectile prefabs?  (Read 2099 times)

4ppleseed

  • Full Member
  • ***
  • Posts: 226
The correct way to destroy projectile prefabs?
« on: May 28, 2013, 05:35:42 PM »
Hi, I'm making a shooting game of sorts. When a projectile prefab hits something I want it to do somethings and then destroy it's self - but this is kicking up all sorts of 'you can't destroy a prefab' style errors. What is the correct way to go about this in Playmaker/Unity?

Is there a 'last collided' type action or how do a kill one projectile without killing the whole prefab?

Thanks  8)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: The correct way to destroy projectile prefabs?
« Reply #1 on: May 28, 2013, 05:49:26 PM »
 Never seen that error before, how are you instanciating them?

A Pooling system works best for recycling projectiles.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D