How to create gibs in decorate?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Fragger
Posts: 24
Joined: Sat Mar 19, 2022 11:59 am
Graphics Processor: Intel (Modern GZDoom)

How to create gibs in decorate?

Post by Fragger »

I have a cube I want to destroy and make it shoot gibs when it dies. The cube is a simple obj model, and I can kill it, but just having the cube disappear looks weird. I added an explosion, only I'd like pieces flying, but my decorate experience is not much.
Any help is appreciated. I searched, but maybe I didn't search correctly.
Jarewill
Posts: 1420
Joined: Sun Jul 21, 2019 8:54 am

Re: How to create gibs in decorate?

Post by Jarewill »

There are a few ways you can do this.
For example you can use A_SpawnItemEx to spawn gib actors and give them velocity, like so:

Code: Select all

A_SpawnItemEx("CubeGib",0,0,24,random(-15,15),random(-15,15),random(0,15))
This should spawn an actor named "CubeGib" with random velocity, you can call this as many times as you want gibs in your cube's death state.
Fragger
Posts: 24
Joined: Sat Mar 19, 2022 11:59 am
Graphics Processor: Intel (Modern GZDoom)

Re: How to create gibs in decorate?

Post by Fragger »

Thanks a lot. That worked.

Return to “Assets (and other stuff)”