[DIY] Randomize uniform color on dead marine actor

Moderator: GZDoom Developers

Randomize uniform color on dead marine actor

Postby Zenon » Sun Apr 19, 2020 4:08 am

I saw this on a different source port
Each dead marine or gibbed marine had different colors, red, green, grey, brown, etc.
Just wondered if that could be added to GZDoom
User avatar
Zenon
Mostly Confused
 
Joined: 21 Apr 2006
Location: New Zealand
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Randomize uniform color on dead marine actor

Postby Graf Zahl » Sun Apr 19, 2020 4:16 am

You do not even need an engine feature for it.
What you need is to define different dead marine sprites with varying translations being set and then a random spawner choosing between them. Load that as an add-on mod and you're done!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Randomize uniform color on dead marine actor

Postby Zenon » Sun Apr 19, 2020 5:09 am

Neato
User avatar
Zenon
Mostly Confused
 
Joined: 21 Apr 2006
Location: New Zealand
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Randomize uniform color on dead marine actor

Postby Gez » Sun Apr 19, 2020 6:40 am

If you want a reference, this was used in ZDCMP2. Mostly visible at the dig site, and in the flowing river of corpses you can glimpse through cracks in the rock wall of the tunnel leading to it.

Though since this was done before the TRNSLATE lump and before ZScript, one could make a much nicer implementation now!
(It's map script #38 to create the translations, and actors/props/marinecorpses.txt for the actor code, with one fugly bunch of chained A_JumpIf because DECORATE didn't want to use Thing_SetTranslation(0, 10+args[0])...)
Gez
 
 
 
Joined: 06 Jul 2007

Re: Randomize uniform color on dead marine actor

Postby Mikk- » Sun Apr 19, 2020 7:10 am

Here's a quick and simple zscript mod that randomises the colour of the Dead & Gibbed Marine sprites. Took a whole five minutes to make, so here you go
User avatar
Mikk-
yooooooooooo
 
Joined: 30 Jun 2009
Location: Somewhere off Kanagawa
Discord: Mikk0451#3922

Re: Randomize uniform color on dead marine actor

Postby Zenon » Tue Apr 21, 2020 1:11 am

Thanks so much
You should make a thread for this in graphics/audio patches or something so it isn't lost in the closed feature suggestions.
Can't wait for the next GZDoom update to be able to use it, I'm excited.
User avatar
Zenon
Mostly Confused
 
Joined: 21 Apr 2006
Location: New Zealand
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest