ReaperAA Posted July 16, 2019 Hi people. In gzdoom, I was trying to modify cleric's mace weapon from Hexen in DECORATE by making it push back enemies like the fighter's fists. I tried making use of "Weapon.pushback" but it doesn't seem to have any effect regardless of the value assigned to it. I modified mace by making a new actor called "CWeapMaceNew" that inherits from and replaces original weapon "CWeapMace". actor CWeapMaceNew : CWeapMace replaces CWeapMace { Weapon.Kickback 9999 States { Fire: CMCE B 2 Offset(60, 20) CMCE B 1 Offset(30, 33) CMCE B 2 Offset(8, 45) CMCE C 1 Offset(8, 45) CMCE D 1 Offset(8, 45) CMCE E 1 Offset(8, 45) CMCE E 1 Offset(-11, 58) A_CustomPunch (random(45,55), 1, 0, "HammerPuff", 144, 0) CMCE F 1 Offset(8, 45) CMCE F 2 Offset(-8, 74) CMCE F 1 Offset(-20, 96) CMCE F 6 Offset(-33, 160) CMCE A 2 Offset(8, 75) A_ReFire CMCE A 1 Offset(8, 65) CMCE A 2 Offset(8, 60) CMCE A 1 Offset(8, 55) CMCE A 2 Offset(8, 50) CMCE A 1 Offset(8, 45) Goto Ready } } What is wrong with this? And before u ask. I had also provided this new weapon to cleric by adding following code in DECORATE Actor ClericPlayerNew : ClericPlayer replaces ClericPlayer { Player.WeaponSlot 1, CWeapMaceNew Player.WeaponSlot 2, CWeapStaff Player.WeaponSlot 3, CWeapFlame Player.WeaponSlot 4, CWeapWraithverge Player.StartItem "CWeapMaceNew" } 0 Quote Share this post Link to post
Empyre Posted July 16, 2019 You have created the weapon and the class, but are you playing as the new class? You can't use "replaces" with player classes. https://zdoom.org/wiki/Creating_new_player_classes 0 Quote Share this post Link to post
ReaperAA Posted July 16, 2019 (edited) 10 hours ago, Empyre said: You have created the weapon and the class, but are you playing as the new class? You can't use "replaces" with player classes. https://zdoom.org/wiki/Creating_new_player_classes Forgot to mention that I have also done that. Other edited weapons are working fine tho (even the increased damage of mace is working fine) and only the kickback thing is not working. Edited July 17, 2019 by ReaperAA 0 Quote Share this post Link to post
Empyre Posted July 18, 2019 (edited) I don't know why Kickback is not working, but maybe you can fake it with A_RaduisThrust. Edited July 18, 2019 by Empyre 1 Quote Share this post Link to post
ReaperAA Posted July 18, 2019 1 hour ago, Empyre said: I don't know why Kickback is not working, but maybe you can fake it with A_RaduisThrust. Thanks. By using it, I managed to get close to the desired kickback effect I needed. For those wondering, I added this line after the line that contains "A_CustomPunch" in code provided at OP: CMCE E 0 Offset(-11, 58) A_RadiusThrust(5000, 64, RTF_NOIMPACTDAMAGE) 0 Quote Share this post Link to post
whirledtsar Posted July 23, 2019 I would recommend finding a different solution than A_CustomPunch. The melee attack functions for Hexen's weapons actually perform hitscan checks in a 45 degree cone around the player, unlike A_CustomPunch which (I believe) only fires one hitscan check straight ahead. So the results don't feel the same. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.