Page 1 of 1

Player taunting using a hotkey?

Posted: Fri Sep 22, 2017 3:38 am
by Graaicko
Hello, was wonding if theres a way to create a player taunting system. I found a bunch of sweet swearing files and would liek to use them as player taunts using a hotkey. I reckon we would need to use acs functions? Thanks.

Re: Player taunting using a hotkey?

Posted: Fri Sep 22, 2017 6:19 am
by R4L
Take a look at wildweasel's Diaz wad. You can taunt and aggro enemies with the reload button if you have fists out.

Re: Player taunting using a hotkey?

Posted: Fri Sep 22, 2017 12:19 pm
by Matt
If you don't want to replace the playerclasses and you don't want to use ZScript (or you don't want this to be dependent on a custominventory item remaining in the player's inventory), ACS will be required.

Here's how it's done in HD:
new keybind defined to a custom command

custom command defined to use a custominventory item

custominventory item given to player at start
(ignore the surrounding code, it's usually better to just do this as a player.startitem or to give the item on an ACS ENTER script (and RESPAWN for deathmatch compatibility) or ZScript PlayerEntered (and PlayerRespawned) event)

custominventory shoots a projectile that calls A_AlertMonsters
(you can just call A_AlertMonsters directly but it's weird to have someone respond to what you say just as you begin talking - there are more efficient ways to create this delay in ZScript now but I won't get into that unless asked)