bloodied weapon skins

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
osjclatchford
Posts: 2062
Joined: Mon Feb 07, 2011 5:02 am

bloodied weapon skins

Post by osjclatchford »

ok not sure if this has been dne before or is even possible with decorate:

in shadow warrior once an enemy had been struck with the sword , said weapon changed to a bloody 'skin' version of the sprite.
once another weapon was selected and the sword re-selected it would be clean again...
i'd like to do this with a knife of mine and perhaps the chainsaw and fists. making the alternative sprites is easy to me but how to implement it via decorate is not.

any help would be greatly appreciated on this one. someone mentioned to me this is being done in brutaldoom but i'm an oldskool zdoom not gzdoom user so have no idea about brutal doom features...

also all my weapons have a quick-kick altfire that uses the idle weapon frame as an altflash. not sure if this would affect any ideas you might have if you fancy helping me on this one... :wink:

thanks in advance
latchford
albiongeck
Posts: 182
Joined: Fri Mar 16, 2012 7:11 am
Contact:

Re: bloodied weapon skins

Post by albiongeck »

I understand if you can't actually run it, but (if these sorts of effects are already in as you said), you could download Brutal doom and look at the decorate code for the weapons that use this feature, to learn how it's done.
mallo
Posts: 1112
Joined: Sat May 22, 2010 12:49 pm

Re: bloodied weapon skins

Post by mallo »

No, they were still covered in blood until the Lo Wang got into water, IIRC, of course.
osjclatchford
Posts: 2062
Joined: Mon Feb 07, 2011 5:02 am

Re: bloodied weapon skins

Post by osjclatchford »

mallo wrote:No, they were still covered in blood until the Lo Wang got into water, IIRC, of course.
oh yeah it did didn't it...
albiongeck wrote:I understand if you can't actually run it, but (if these sorts of effects are already in as you said), you could download Brutal doom and look at the decorate code for the weapons that use this feature, to learn how it's done.
oh yeah! DUH! :roll: I've just done as you suggested and found its an a_jump to a state that keys off of the bloodied hud.
decided that its too damned complicated, what with the green and blue blood to do too...
User avatar
BloodyAcid
Posts: 372
Joined: Thu Jul 26, 2012 10:28 pm
Location: Canadia

Re: bloodied weapon skins

Post by BloodyAcid »

osjclatchford
Posts: 2062
Joined: Mon Feb 07, 2011 5:02 am

Re: bloodied weapon skins

Post by osjclatchford »

spot on nice one!
osjclatchford
Posts: 2062
Joined: Mon Feb 07, 2011 5:02 am

Re: bloodied weapon skins

Post by osjclatchford »

BloodyAcid wrote:http://forum.zdoom.org/viewtopic.php?f=37&t=34539

Is this close enough?
just realised that this would only work providing you only want red blood. thats why (I think) brutal-doom jumps frame depending on what blood is splashed on the hud. otherwise you cant use this mod (as it is) and have green and blue blood variants in this method. as it is the weapon itself that gives the alternative 'skin' based on proximity to a monster, but not what kind of monster it is or what alternative colour blood it may or may not have. get me?
anyone have any ideas? I'm hoping its something that can be fixed without messing with the monster codes too... its just so damned complicated! and my brain is beginning to get lost in the woods... LOL
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: bloodied weapon skins

Post by amv2k9 »

Code: Select all

ACTOR GunGetsMessy : Weapon
{
 States
 {
 Ready:
  TNT1 A 0 A_JumpIfInventory("GotRedBloodOnGun",1,"Ready_RedBloodSpatter")
  TNT1 A 0 A_JumpIfInventory("GotGreenBloodOnGun",1,"Ready_GreenBloodSpatter")
  TNT1 A 0 A_JumpIfInventory("GotBlueBloodOnGun",1,"Ready_BlueBloodSpatter")
  GUNR A 1 A_WeaponReady
  Loop
 Ready_RedBloodSpatter:
  TNT1 A 0 A_JumpIf(waterlevel == 2,"RemoveBlood")
  GUNR R 1 A_WeaponReady
  Goto Ready
  ...
 RemoveBlood:
  TNT1 A 0 A_TakeInventory("GotRedBloodOnGun")
  TNT1 A 0 A_TakeInventory("GotGreenBloodOnGun")
  TNT1 A 0 A_TakeInventory("GotBlueBloodOnGun")
  Goto Ready
 Fire:
  TNT1 A 0 A_JumpIfInventory("GotRedBloodOnGun",1,"Fire_RedBloodSpatter")
  ...
  TNT1 A 0 A_JumpIfInventory("GotRedBloodOnGun",1,"PostFire_RedBloodSpatter") // this would be placed right after the bullet is fired, so that you get blood on it right away, rather than when you next enter the Ready or Fire states and the item is checked for.
  ...
  Goto Ready
 }
}

ACTOR Zambiemon : Zombieman
{
 States
 {
 Pain:
  TNT1 A 0 A_RadiusGive("GotRedBloodOnGun",128,RGF_PLAYERS,1)
  Goto Super :: Pain
 }
}

ACTOR KeckoDaemon : Cacodemon
{
 States
 {
 Pain:
  TNT1 A 0 A_RadiusGive("GotBlueBloodOnGun",128,RGF_PLAYERS,1)
  Goto Super :: Pain
 }
}
osjclatchford
Posts: 2062
Joined: Mon Feb 07, 2011 5:02 am

Re: bloodied weapon skins

Post by osjclatchford »

NICE one! its actually quite straightforward isn't it? many thanks I'll try this out when I get a chance and let you guys know how I get on...
osjclatchford
Posts: 2062
Joined: Mon Feb 07, 2011 5:02 am

Re: bloodied weapon skins

Post by osjclatchford »

well that worked a treat thanks guys!
Locked

Return to “Editing (Archive)”