One-Liners / Taunt button?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!
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.

Re: One-Liners / Taunt button?

Postby wildweasel » Sat Oct 14, 2017 9:27 pm

You're gonna have to post your WAD file at this point. I don't know what you've done wrong.
User avatar
wildweasel
「お前はもうトースト」[you are already toast.]
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: One-Liners / Taunt button?

Postby ramon.dexter » Sun Oct 15, 2017 2:31 am

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
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia

Re: One-Liners / Taunt button?

Postby Hidden Hands » Mon Oct 23, 2017 7:15 am

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
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: One-Liners / Taunt button?

Postby ramon.dexter » Tue Oct 24, 2017 2:26 am

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
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia

Re: One-Liners / Taunt button?

Postby Hexereticdoom » Tue Oct 24, 2017 2: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 allExpand view
AddMenuKey "Taunt Action" taunting
Alias taunting "pukename taunting"
DefaultBind T taunting


LOADACS
Code: Select allExpand view
TAUNTING


TAUNTING (Compiled ACS file)
Code: Select allExpand view
#library "taunting"
#include "zcommon.acs"

Script "Taunting" (void)
{
   if (UseInventory("PlayerTauntingAction"))
   {
      terminate;
   }
}


PLAYER (Referring to customized player's Decorate lump)
Code: Select allExpand view
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
Hexereticdoom
Don't make me angry or I'll bite you! Heheheee...
 
Joined: 08 Aug 2013
Location: Spain

Re: One-Liners / Taunt button?

Postby Zen3001 » Fri Oct 27, 2017 3:01 pm

here's a useful acs function https://zdoom.org/wiki/GetPlayerInput
User avatar
Zen3001
Cannot the kingdom of salvation take me home?
Banned User
 
Joined: 25 Nov 2016
Location: some northern german shithole
Discord: #0629

Re: One-Liners / Taunt button?

Postby Hidden Hands » Thu May 17, 2018 10: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.
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: One-Liners / Taunt button?

Postby Matt » Thu May 17, 2018 12:41 pm

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
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: One-Liners / Taunt button?

Postby Hidden Hands » Fri May 18, 2018 3: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.
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: One-Liners / Taunt button?

Postby Matt » Mon May 21, 2018 1: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 allExpand view
$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 allExpand view
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 allExpand view
addeventhandlers = "TauntHandler"


Make sure you test this using the key, not just typing "oneliner" in the console!
User avatar
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: One-Liners / Taunt button?

Postby Hidden Hands » Mon May 28, 2018 12:37 pm

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 204 times
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: One-Liners / Taunt button?

Postby wildweasel » Mon May 28, 2018 12:44 pm

What version of GZDoom are you using?
User avatar
wildweasel
「お前はもうトースト」[you are already toast.]
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: One-Liners / Taunt button?

Postby Hidden Hands » Mon May 28, 2018 12:47 pm

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 allExpand view
 [addmenukey] Y
 
 addkeysection
 
   addmenukey "Taunts" oneliner
   alias oneliner "netevent taunt"
   defaultbind Y oneliner


SNDINFO
Code: Select allExpand view
$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 allExpand view
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 allExpand view
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
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: One-Liners / Taunt button?

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

You've replaced "$random Taunts/Ash" with "$random Ash" so the sound still isn't being called.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: One-Liners / Taunt button?

Postby Hidden Hands » Mon May 28, 2018 6: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 allExpand view
$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?
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

PreviousNext

Return to Assets

Who is online

Users browsing this forum: No registered users and 1 guest