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.
How to create gibs in decorate?
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.
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.
-
- Posts: 41
- Joined: Sat Mar 19, 2022 11:59 am
- Graphics Processor: Intel (Modern GZDoom)
-
-
- Posts: 1805
- Joined: Sun Jul 21, 2019 8:54 am
Re: How to create gibs in decorate?
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:
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.
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))
-
- Posts: 41
- Joined: Sat Mar 19, 2022 11:59 am
- Graphics Processor: Intel (Modern GZDoom)
Re: How to create gibs in decorate?
Thanks a lot. That worked.