Pixel Splatter

Hi! I need some help creating a pixel splatter when the character dies. Just like a small bit of squares exploding.

Thank you so much!

import bge
cont = bge.logic.getCurrentController()
own = cont.owner
Splat=[1,1,1,1,1,1,]
for Items in splat:
    Duration = 12
    Added = bge.logic.getCurrentScene().addObject('PixelSplat',own,Duration)
    Added.worldLinearVelocity =((-2 +bge.logic.getRandomFloat()*4)*12,(-2 +bge.logic.getRandomFloat()*4)*12,(-2 +bge.logic.getRandomFloat()*4)*12)
    own.endObject()

you need your pixel splatter objects to be dynamic or rigid body, ghost, with very high dampening

Named PixelSplat on a hidden layer.

the * 12 = speed multiplier

Thank you so much BluePrint!

No problem

Attachments

PixleSplat.blend (417 KB)

You amaizing