Ancient EviL Posted December 28, 2015 So if anyone has ever played Duke Nukem or Blood, they know that the player character will occasionally say taunts when killing monsters. Is there any way to script this in Doom Builder? 0 Share this post Link to post
scifista42 Posted December 28, 2015 Doom Builder is just a map editor. Your idea is related to game behavior, so you'd need something like ZDoom's DECORATE to implement such an idea. DECORATE lump should be placed into your wad via a wad content editor, I recommend SLADE3. Anyway, this would not be trivial to implement at all - you'd need to make a new player class, then somehow make it detect when a monster gets killed by the player (I'm not sure how this would be achieved reliably, maybe it would require to redefine all player's weapons and maybe even redefine all monster types) and jump to a custom state to play a sound. I personally see this as the kind of problem that's by far not worth the effort needed to make it happen. Although I think Brutal Doom already has something like that (but I'm not 100% sure), so that you can open its DECORATE player definition for some inspiration, but it would be probably close to useless if you've never seen DECORATE before. 0 Share this post Link to post
Tango Posted December 28, 2015 what about the easier (though less convincing) method of a weapon's fire state (or maybe just the player class definition's fire state) playing a random "taunt" sound? that would be a pretty easy way to go about it, I think 0 Share this post Link to post
Chezza Posted December 28, 2015 I would imagine there is a risk of a taunt being overused if a particular weapon or monster death state were to trigger it. Maybe on something like Brutal Doom where there are a variety of monster deaths and one particular rare one with specific conditions sets it off, like doing a one shot head-shot kill on a Hell Knight with a SSG which isn't always successful. Then again there is probably a decorate script to create a cool-down before the next taunts or a random % to throw in there. 0 Share this post Link to post
Ancient EviL Posted December 29, 2015 scifista42 said:Doom Builder is just a map editor. Your idea is related to game behavior, so you'd need something like ZDoom's DECORATE to implement such an idea. DECORATE lump should be placed into your wad via a wad content editor, I recommend SLADE3. Anyway, this would not be trivial to implement at all - you'd need to make a new player class, then somehow make it detect when a monster gets killed by the player (I'm not sure how this would be achieved reliably, maybe it would require to redefine all player's weapons and maybe even redefine all monster types) and jump to a custom state to play a sound. I personally see this as the kind of problem that's by far not worth the effort needed to make it happen. Although I think Brutal Doom already has something like that (but I'm not 100% sure), so that you can open its DECORATE player definition for some inspiration, but it would be probably close to useless if you've never seen DECORATE before. Yeah I see your point, I was thinking the same thing. I have used DECORATE before, I mess around with it all the time, but I figured it would be something hard to implement. I'll see what I can do with SLADE and some ACS scripting! Thank you for feedback! Chezza said:I would imagine there is a risk of a taunt being overused if a particular weapon or monster death state were to trigger it. Maybe on something like Brutal Doom where there are a variety of monster deaths and one particular rare one with specific conditions sets it off, like doing a one shot head-shot kill on a Hell Knight with a SSG which isn't always successful. Then again there is probably a decorate script to create a cool-down before the next taunts or a random % to throw in there. Yeah I don't want it being overused is the problem. I could always edit the final boss of a particular level's death sound and just add the taunt to the monster's default death sound, I've thought of this before but I feel like true random taunts are gonna be too difficult to implement. Tango said:what about the easier (though less convincing) method of a weapon's fire state (or maybe just the player class definition's fire state) playing a random "taunt" sound? that would be a pretty easy way to go about it, I think Wouldn't the taunt just play during firing then though? Not triggered by a monster's death? That would still be cool to be honest though. 0 Share this post Link to post
scifista42 Posted December 29, 2015 Ancient EviL said:I feel like true random taunts are gonna be too difficult to implement. In fact it's the opposite, randomness is easy to achieve. In DECORATE you have A_Jump to jump to a random state, and in SNDINFO you have $random keyword to define a sound identifier as a random selection from a list of multiple sounds. 0 Share this post Link to post
Tango Posted December 30, 2015 yeah, what scifista said. you could use a_jump in your firing states to first random between playing a taunt sound and not, and then the taunt sound itself would be randomized in SNDINFO as scifista said. I guess the only real downside to this method I see is that you could potentially sound off a taunt even if you're not actually shooting at anything, though I think it's pretty rare for the player to intentionally shoot at nothing haha. that, and the taunt would obviously not be sensitive to whether your target actually died or not should also note that the easiest way of doing this, as I mentioned above, would be to put this logic in the firing state of the player class, which the player enters no matter what's being fired, instead of having to manually inject this logic into the firing state of every single weapon 0 Share this post Link to post
Blue Shadow Posted December 30, 2015 The only way I see it, is to redefine every monster so they give their killer an item by which the taunt sound is played. Here is a working example: ACTOR LostSoul2 : LostSoul replaces LostSoul { States { Death: // A killed actor's target is the one that killed it, so give that killer this item. TNT1 A 0 A_GiveToTarget("TauntItem") // We aren't interested in redefining the death sequence, so use the original monster's. Goto Super::Death } } ACTOR TauntItem : CustomInventory { States { Pickup: // Since we don't want non-player actors to taunt, we need to check if the receiver of the // item (killer, in this case) is a player or not, jumping to "Taunt" state and playing the // taunt sound if it is. TNT1 A 0 A_JumpIf(CheckClass("PlayerPawn", AAPTR_DEFAULT, TRUE), "Taunt") Stop Taunt: TNT1 A 0 A_PlaySound("vile/sight", CHAN_7) Stop } }You can consult the ZDoom Wiki if you'd like to learn about the functions used in there. 0 Share this post Link to post