Here's a way to do it without inventory items, playerpawn replacements or potentially cheat-disabled ACS script puking.
Define the taunt action in a ZScript eventhandler:
Code: Select all
class TauntHandler:EventHandler{
override void NetworkProcess(ConsoleEvent e){
//check to ensure the acting player can taunt
let ppp=playerpawn(players[e.player].mo);
if(!ppp)return;
if(
e.name~=="taunt"
&&ppp.health>0 //delete if you want corpses taunting the enemy
){
ppp.A_PlaySound("*taunt",CHAN_VOICE);
ppp.A_TakeInventory("powerfrightener");
ppp.A_AlertMonsters();
}
}
Define some sounds to use in SNDINFO:
Code: Select all
$playersound player male *taunt swivethyselfm
$playersound player female *taunt swivethyselff
Enable the ZScript event handler in MAPINFO:
Set a key for it in KEYCONF (same principle works for the ACS+Decorate version, just replace the netevent with using the item):
Code: Select all
//this creates a command to activate the netevent
//though you could probably just call this directly too
alias taunt "netevent taunt";
//adds the taunt to the menu (optional)
addmenukey "Taunt" taunt
Here's a way to do it without inventory items, playerpawn replacements or potentially cheat-disabled ACS script puking.
Define the taunt action in a ZScript eventhandler:[code=php]class TauntHandler:EventHandler{
override void NetworkProcess(ConsoleEvent e){
//check to ensure the acting player can taunt
let ppp=playerpawn(players[e.player].mo);
if(!ppp)return;
if(
e.name~=="taunt"
&&ppp.health>0 //delete if you want corpses taunting the enemy
){
ppp.A_PlaySound("*taunt",CHAN_VOICE);
ppp.A_TakeInventory("powerfrightener");
ppp.A_AlertMonsters();
}
}[/code]
Define some sounds to use in SNDINFO:[code=php]$playersound player male *taunt swivethyselfm
$playersound player female *taunt swivethyselff[/code]
Enable the ZScript event handler in MAPINFO:[code=php]addeventhandlers="TauntHandler"[/code]
Set a key for it in KEYCONF (same principle works for the ACS+Decorate version, just replace the netevent with using the item):[code=php]//this creates a command to activate the netevent
//though you could probably just call this directly too
alias taunt "netevent taunt";
//adds the taunt to the menu (optional)
addmenukey "Taunt" taunt[/code]