One-Liners / Taunt button?

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.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: One-Liners / Taunt button?

Post by wildweasel »

You're gonna have to post your WAD file at this point. I don't know what you've done wrong.
User avatar
ramon.dexter
Posts: 1520
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: One-Liners / Taunt button?

Post by ramon.dexter »

Hidden Hands, I strongly advise you to head over to zdoom wiki and start learning. :ugeek:
This is the right place to start: https://zdoom.org/wiki/ACS
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: One-Liners / Taunt button?

Post by Hidden Hands »

Am trying to learn it but I think this will take me a while.

I will share my WAD so maybe I can be pointed out what I did wrong.
User avatar
ramon.dexter
Posts: 1520
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: One-Liners / Taunt button?

Post by ramon.dexter »

Well, all I can advise you is to download some other project, open it in slade and look, how it is set-up.
This worked for me.
User avatar
Hexereticdoom
Posts: 652
Joined: Thu Aug 08, 2013 1:30 pm
Graphics Processor: nVidia with Vulkan support
Location: Spain
Contact:

Re: One-Liners / Taunt button?

Post by Hexereticdoom »

Hello! For your reference, this is the way I have coded the taunting action in my most recent Doom mod, hope it can be useful for you. :wink:

(It may be a bit complicated, but actually I don't know an easier way to do it...)

KEYCONF

Code: Select all

AddMenuKey "Taunt Action" taunting
Alias taunting "pukename taunting"
DefaultBind T taunting
LOADACS

Code: Select all

TAUNTING
TAUNTING (Compiled ACS file)

Code: Select all

#library "taunting"
#include "zcommon.acs"

Script "Taunting" (void)
{
	if (UseInventory("PlayerTauntingAction"))
	{
		terminate;
	}
}
PLAYER (Referring to customized player's Decorate lump)

Code: Select all

ACTOR NewPlayer : DoomPlayer replaces DoomPlayer
{
	Player.StartItem "PlayerTauntingAction", 0x7FFFFFFF
}

ACTOR PlayerTauntingAction : CustomInventory
{
	Inventory.MaxAmount 0x7FFFFFFF
	-INVENTORY.INVBAR
	-COUNTITEM
	States
	{
	Use:
		TNT1 A 0 A_PlaySound("PlayerTaunting", 2)
		TNT1 A 0 A_AlertMonsters
		Fail
	}
}
Don't forget you can adapt the code according to your needs, it doesn't have to be exactly as this.
User avatar
Zen3001
Posts: 412
Joined: Fri Nov 25, 2016 7:17 am
Location: some northern german shithole

Re: One-Liners / Taunt button?

Post by Zen3001 »

here's a useful acs function https://zdoom.org/wiki/GetPlayerInput
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: One-Liners / Taunt button?

Post by Hidden Hands »

I have tried for months now. Still no luck. I'm going to post my wad tonight. Please help when I do I really don't know what the heck is up with it.

Thank you in advance.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: One-Liners / Taunt button?

Post by Matt »

Here's a ZScript approach that took a lot of bugs and trouble but it seems less so than what's happened on this thread.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: One-Liners / Taunt button?

Post by Hidden Hands »

Matt wrote:Here's a ZScript approach that took a lot of bugs and trouble but it seems less so than what's happened on this thread.
http://www.mediafire.com/file/d613edreq ... 2Ashes.wad

Here is my new Evil Dead wad. Stuck in early stages because this taunt button wont work. Y is supposed to make Ash taunt but it does NOTHING. Please, someone help me fix this over a year old issue.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: One-Liners / Taunt button?

Post by Matt »

You've got your ACS and SNDINFO set up wrong.

You have two LOADACS lumps.

One of them just says "axe"

The other has your "taunts" script

There is no compiled ACS binary lump called "axe"

Meanwhile your KEYCONF binds that taunt alias to "puke 302" but there's no script 302

In your SNDINFO you've got

Code: Select all

$random Taunts/Ash { Taunts/Taunt01 Taunts/Taunt02 Taunts/Taunt03 Taunts/Taunt04 Taunts/Taunt05 Taunts/Taunt06 Taunts/Taunt07 Taunts/Taunt08 Taunts/Taunt09 Taunts/Taunt10 }
ash/taunt01 ASHT01
ash/taunt02 ASHT02
ash/taunt03 ASHT03
ash/taunt04 ASHT04
ash/taunt05 ASHT05
ash/taunt06 ASHT06
ash/taunt07 ASHT07
ash/taunt08 ASHT08
ash/taunt09 ASHT09
ash/taunt10 ASHT10
so you're calling "Taunts/Taunt01" when the actual sound name is "ash/taunt01"



I can't be bothered to code the ACS so here's my solution:


Delete both your LOADACS lumps and add the following ZSCRIPT lump:

Code: Select all

version "3.3"

class TauntHandler:EventHandler{
	override void NetworkProcess(ConsoleEvent e){
		let ppp = playerpawn(players[e.player].mo);
		if(!ppp) return;
		if(
			e.name~=="taunt"
			&&ppp.health>0
		){
			ppp.A_PlaySound("taunts/ash",CHAN_VOICE);
			ppp.A_AlertMonsters();
		}
	}
}
in KEYCONF, instead of the puke, bind the alias to "netevent taunt"

in SNDINFO, replace all "Taunt/" with "ash/"

in the MAPINFO lump that contains the gameinfo section, add inside that section

Code: Select all

addeventhandlers = "TauntHandler"
Make sure you test this using the key, not just typing "oneliner" in the console!
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: One-Liners / Taunt button?

Post by Hidden Hands »

I'm getting this error now I have done all you suggested. What does this mean? It works when I change the 3.3 to 3.1, BUT no taunting works. Any advice?
Attachments
newerror.png
newerror.png (6.44 KiB) Viewed 1758 times
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: One-Liners / Taunt button?

Post by wildweasel »

What version of GZDoom are you using?
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: One-Liners / Taunt button?

Post by Hidden Hands »

wildweasel wrote:What version of GZDoom are you using?
3.1.0.0

Okay I upgraded to 3.3.0.

Now the game loads but there is nothing happening at all with the taunt button still.

Here is my setup:

KEYCONFIG

Code: Select all

 [addmenukey] Y
 
 addkeysection
 
   addmenukey "Taunts" oneliner
   alias oneliner "netevent taunt"
   defaultbind Y oneliner
SNDINFO

Code: Select all

$random Ash { ash/Taunt01 ash/Taunt02 ash/Taunt03 ash/Taunt04 ash/Taunt05 ash/Taunt06 ash/Taunt07 ash/Taunt08 ash/Taunt09 ash/Taunt10 }
ash/taunt01 ASHT01
ash/taunt02 ASHT02
ash/taunt03 ASHT03
ash/taunt04 ASHT04
ash/taunt05 ASHT05
ash/taunt06 ASHT06
ash/taunt07 ASHT07
ash/taunt08 ASHT08
ash/taunt09 ASHT09
ash/taunt10 ASHT10
ZSCRIPT

Code: Select all

version "3.3"

class TauntHandler:EventHandler{
   override void NetworkProcess(ConsoleEvent e){
      let ppp = playerpawn(players[e.player].mo);
      if(!ppp) return;
      if(
         e.name~=="taunt"
         &&ppp.health>0
      ){
         ppp.A_PlaySound("taunts/ash",CHAN_VOICE);
         ppp.A_AlertMonsters();
      }
   }
}
MAPINFO

Code: Select all

gameinfo
{
    playerclasses = "AxePlayer" 
	addeventhandlers = "TauntHandler"
}
What am I doing wrong here!? I made the ZSCRIPT a text lump in my wad... is that correct? There is no "text language" for ZDoom Zscript in the drop down box... so do I just leave it like this?
Attachments
zscit.png
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: One-Liners / Taunt button?

Post by Matt »

You've replaced "$random Taunts/Ash" with "$random Ash" so the sound still isn't being called.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: One-Liners / Taunt button?

Post by Hidden Hands »

Matt wrote:You've replaced "$random Taunts/Ash" with "$random Ash" so the sound still isn't being called.
Ok thank you so much that fixed it. Excellent. I have a working taunt button.

However, now I have one minor issue. I added more taunts, so there are 70 in total. Here is my setup.

Code: Select all

$random Taunts/ash { ash/Taunt01 ash/Taunt02 ash/Taunt03 ash/Taunt04 ash/Taunt05 ash/Taunt06 ash/Taunt07 ash/Taunt08 ash/Taunt09 ash/Taunt10 ash/Taunt11 ash/Taunt12 ash/Taunt13 ash/Taunt14 ash/Taunt15 ash/Taunt16 ash/Taunt17 ash/Taunt18 ash/Taunt19 ash/Taunt20 ash/Taunt21 ash/Taunt22 ash/Taunt23 ash/Taunt24 ash/Taunt25 ash/Taunt26 ash/Taunt27 ash/Taunt28 ash/Taunt29 ash/Taunt30 ash/Taunt31 ash/Taunt32 ash/Taunt33 ash/Taunt34 ash/Taunt35 ash/Taunt36 ash/Taunt37 ash/Taunt38 ash/Taunt39 ash/Taunt40 ash/Taunt41 ash/Taunt42 ash/Taunt43 ash/Taunt44 ash/Taunt45 ash/Taunt46 ash/Taunt47 ash/Taunt48 ash/Taunt49 ash/Taunt50 ash/Taunt51 ash/Taunt52 ash/Taunt53 ash/Taunt54 ash/Taunt55 ash/Taunt56 ash/Taunt57 ash/Taunt58 ash/Taunt59 ash/Taunt60 ash/Taunt61 ash/Taunt62 ash/Taunt63 ash/Taunt64 ash/Taunt65 ash/Taunt66 ash/Taunt67 ash/Taunt68 ash/Taunt69 ash/Taunt70 }
ash/taunt01 ASHT01
ash/taunt02 ASHT02
ash/taunt03 ASHT03
ash/taunt04 ASHT04
ash/taunt05 ASHT05
ash/taunt06 ASHT06
ash/taunt07 ASHT07
ash/taunt08 ASHT08
ash/taunt09 ASHT09
ash/taunt10 ASHT10
ash/taunt01 ASHT11
ash/taunt02 ASHT12
ash/taunt03 ASHT13
ash/taunt04 ASHT14
ash/taunt05 ASHT15
ash/taunt06 ASHT16
ash/taunt07 ASHT17
ash/taunt08 ASHT18
ash/taunt09 ASHT19
ash/taunt10 ASHT20
ash/taunt01 ASHT21
ash/taunt02 ASHT22
ash/taunt03 ASHT23
ash/taunt04 ASHT24
ash/taunt05 ASHT25
ash/taunt06 ASHT26
ash/taunt07 ASHT27
ash/taunt08 ASHT28
ash/taunt09 ASHT29
ash/taunt10 ASHT30
ash/taunt01 ASHT31
ash/taunt02 ASHT32
ash/taunt03 ASHT33
ash/taunt04 ASHT34
ash/taunt05 ASHT35
ash/taunt06 ASHT36
ash/taunt07 ASHT37
ash/taunt08 ASHT38
ash/taunt09 ASHT39
ash/taunt10 ASHT40
ash/taunt01 ASHT41
ash/taunt02 ASHT42
ash/taunt03 ASHT43
ash/taunt04 ASHT44
ash/taunt05 ASHT45
ash/taunt06 ASHT46
ash/taunt07 ASHT47
ash/taunt08 ASHT48
ash/taunt09 ASHT49
ash/taunt10 ASHT50
ash/taunt01 ASHT51
ash/taunt02 ASHT52
ash/taunt03 ASHT53
ash/taunt04 ASHT54
ash/taunt05 ASHT55
ash/taunt06 ASHT56
ash/taunt07 ASHT57
ash/taunt08 ASHT58
ash/taunt09 ASHT59
ash/taunt10 ASHT60
ash/taunt01 ASHT61
ash/taunt02 ASHT62
ash/taunt03 ASHT63
ash/taunt04 ASHT64
ash/taunt05 ASHT65
ash/taunt06 ASHT66
ash/taunt07 ASHT67
ash/taunt08 ASHT68
ash/taunt09 ASHT69
ash/taunt10 ASHT70
But now, a taunt isn't always played when the button is pressed. Sometimes Ash says nothing. Occasionally, a taunt will be spoken. And usually only a few of the ones programmed. How to fix?
Post Reply

Return to “Assets (and other stuff)”