frozze
New Member
Posts: 12
Posts: 12
|
Post by frozze on Aug 5, 2015 19:47:04 GMT
Hi.
So i have a cube that is fractured into 32 fragments. I have a prefabpool called cubes. Then i have my bosspool and droped my cube into that.
I then use the playmaker action spawn so spawn a cube, useing the cubes prefabpool.
I have a setup where I can destroy that cube. But how do i despawn all the fragments?
If i use the despawn action, it just despawn the cube, but not the fragments. I guess it's because the fragments isn't in the pool after the explosion happens?
Best regards
frozze
|
|
|
Post by DarkTonic Dev on Aug 5, 2015 20:53:19 GMT
I would think you should make the fragments as child game object of the cube, so that it all despawns at once when you despawn the cube. But maybe that's not what you want...
Also, if you set up your 32 fragments to spawn from a Triggered Spawner wave on the cube (using Start / OnEnabled / Visible event) instead of spawning them from Playmaker, then you can set the fragment Killable's to despawn when parent dies automatically.
Hopefully that's some help.
|
|
frozze
New Member
Posts: 12
Posts: 12
|
Post by frozze on Aug 6, 2015 12:28:25 GMT
I would think you should make the fragments as child game object of the cube, so that it all despawns at once when you despawn the cube. But maybe that's not what you want... Also, if you set up your 32 fragments to spawn from a Triggered Spawner wave on the cube (using Start / OnEnabled / Visible event) instead of spawning them from Playmaker, then you can set the fragment Killable's to despawn when parent dies automatically. Hopefully that's some help. Great thanks. I'll look into when i get home. Also would it be possible to make the fragments removed over time? It looks stupid if they they're just removed instantly. I'm thinking like scaling them down from 1 to 0, and then despawn them? best regards
|
|
|
Post by DarkTonic Dev on Aug 6, 2015 15:38:32 GMT
You can make them die instead of despawn so they can explode with a particle or death prefab.
Would that work?
|
|