One-Liners / Taunt button?
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.
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.
-
- 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
Re: One-Liners / Taunt button?
You're gonna have to post your WAD file at this point. I don't know what you've done wrong.
-
- Posts: 1556
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: One-Liners / Taunt button?
Hidden Hands, I strongly advise you to head over to zdoom wiki and start learning.
This is the right place to start: https://zdoom.org/wiki/ACS
This is the right place to start: https://zdoom.org/wiki/ACS
-
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
Re: One-Liners / Taunt button?
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.
I will share my WAD so maybe I can be pointed out what I did wrong.
-
- Posts: 1556
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: One-Liners / Taunt button?
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.
This worked for me.
-
- Posts: 660
- Joined: Thu Aug 08, 2013 1:30 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Spain
Re: One-Liners / Taunt button?
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.
(It may be a bit complicated, but actually I don't know an easier way to do it...)
KEYCONF
LOADACS
TAUNTING (Compiled ACS file)
PLAYER (Referring to customized player's Decorate lump)
Don't forget you can adapt the code according to your needs, it doesn't have to be exactly as this.
(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
Code: Select all
TAUNTING
Code: Select all
#library "taunting"
#include "zcommon.acs"
Script "Taunting" (void)
{
if (UseInventory("PlayerTauntingAction"))
{
terminate;
}
}
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
}
}
-
- Posts: 412
- Joined: Fri Nov 25, 2016 7:17 am
- Location: some northern german shithole
Re: One-Liners / Taunt button?
here's a useful acs function https://zdoom.org/wiki/GetPlayerInput
-
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
Re: One-Liners / Taunt button?
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.
Thank you in advance.
-
- 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
Re: One-Liners / Taunt button?
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.
-
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
Re: One-Liners / Taunt button?
http://www.mediafire.com/file/d613edreq ... 2Ashes.wadMatt 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.
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.
-
- 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
Re: One-Liners / Taunt button?
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
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:
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
Make sure you test this using the key, not just typing "oneliner" in the console!
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
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 SNDINFO, replace all "Taunt/" with "ash/"
in the MAPINFO lump that contains the gameinfo section, add inside that section
Code: Select all
addeventhandlers = "TauntHandler"
-
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
Re: One-Liners / Taunt button?
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?
You do not have the required permissions to view the files attached to this post.
-
- 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
Re: One-Liners / Taunt button?
What version of GZDoom are you using?
-
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
Re: One-Liners / Taunt button?
3.1.0.0wildweasel wrote:What version of GZDoom are you using?
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
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
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();
}
}
}
Code: Select all
gameinfo
{
playerclasses = "AxePlayer"
addeventhandlers = "TauntHandler"
}
You do not have the required permissions to view the files attached to this post.
-
- 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
Re: One-Liners / Taunt button?
You've replaced "$random Taunts/Ash" with "$random Ash" so the sound still isn't being called.
-
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
Re: One-Liners / Taunt button?
Ok thank you so much that fixed it. Excellent. I have a working taunt button.Matt wrote:You've replaced "$random Taunts/Ash" with "$random Ash" so the sound still isn't being called.
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