One-Liners / Taunt button?

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: One-Liners / Taunt button?

Re: One-Liners / Taunt button?

by Hidden Hands » Tue May 29, 2018 12:37 pm

Matt wrote:Look very, very carefully at that SNDINFO code you posted.

Read each line out loud.

You might notice something.
HOW THE HELL DID I MISS THAT!? Thank you tons, really, THANKS.

I'm a flipping moron.

EDIT: It works perfectly now. Thanks so much. Now I can actually get on with making the game.

Re: One-Liners / Taunt button?

by Matt » Mon May 28, 2018 8:02 pm

Look very, very carefully at that SNDINFO code you posted.

Read each line out loud.

You might notice something.

Re: One-Liners / Taunt button?

by Hidden Hands » Mon May 28, 2018 7:28 pm

Matt wrote:Maybe you should just add a bit more whitespace in your SNDINFO file (and other things).

In the sound names you're defining ash/taunt01 through ash/taunt10 7 times instead of ash/taunt01 through ash/taunt70.
So do I remove all the ash/tauntxx except 01 and 70? how does it know to include the ones between? Or am I misunderstanding.

Re: One-Liners / Taunt button?

by Matt » Mon May 28, 2018 5:59 pm

Maybe you should just add a bit more whitespace in your SNDINFO file (and other things).

In the sound names you're defining ash/taunt01 through ash/taunt10 7 times instead of ash/taunt01 through ash/taunt70.

Re: One-Liners / Taunt button?

by Hidden Hands » Mon May 28, 2018 5:51 pm

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?

Re: One-Liners / Taunt button?

by Matt » Mon May 28, 2018 4:59 pm

You've replaced "$random Taunts/Ash" with "$random Ash" so the sound still isn't being called.

Re: One-Liners / Taunt button?

by Hidden Hands » Mon May 28, 2018 11:47 am

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

Re: One-Liners / Taunt button?

by wildweasel » Mon May 28, 2018 11:44 am

What version of GZDoom are you using?

Re: One-Liners / Taunt button?

by Hidden Hands » Mon May 28, 2018 11:37 am

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 1753 times

Re: One-Liners / Taunt button?

by Matt » Mon May 21, 2018 12:06 am

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!

Re: One-Liners / Taunt button?

by Hidden Hands » Fri May 18, 2018 2:31 pm

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.

Re: One-Liners / Taunt button?

by Matt » Thu May 17, 2018 11:41 am

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.

Re: One-Liners / Taunt button?

by Hidden Hands » Thu May 17, 2018 9:18 am

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.

Re: One-Liners / Taunt button?

by Zen3001 » Fri Oct 27, 2017 2:01 pm

here's a useful acs function https://zdoom.org/wiki/GetPlayerInput

Re: One-Liners / Taunt button?

by Hexereticdoom » Tue Oct 24, 2017 1:27 pm

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.

Top