Spoiler:Code: Select all
Class duke_rvl : Weapon { int Shact; Default{ +WEAPON.NOAUTOAIM Weapon.SlotNumber 2; Weapon.SelectionOrder 1000; Weapon.BobRangeX -1.6; Weapon.BobRangeY -0.7; Weapon.BobSpeed 1.4; Weapon.BobStyle "InverseSmooth"; Weapon.AmmoUse 1; Weapon.AmmoGive 12; Weapon.AmmoType "ShotgunAmmo"; Decal "BulletC"; Scale 0.5; Obituary "$OB_MPPISTOL"; Inventory.Pickupmessage "Vecxyz System Pistol 2020 (SLOT 2)"; Inventory.PickupSound "CLIPP";} States { Check: TNT1 A 0 A_JumpIfInventory("KickAct",1,"Kick"); TNT1 A 1; Loop; Kick: TNT1 A 0 A_JumpIf(GetCVAR("duke_mes") == 0, "KKick"); TNT1 A 0 A_Print("Mighty Foot Engaged"); KKick: WP09 A 3 A_OverlayOffset(-5,0,0,WOF_ADD); WP09 E 6 A_CustomPunch(random(16,24),true,CPF_NORANDOMPUFFZ,"QuakyPuff",49); WP09 A 2; TNT1 A 4; Goto Check; Ready: TNT1 A 0 A_Overlay (-5, "Check"); RReady: WP14 A 1 A_WeaponReady(WRF_ALLOWRELOAD); Loop; Deselect: WP14 A 1 A_Lower(13); Loop; Select: WP14 A 1 A_Raise(13); Loop; Fire: TNT1 A 0 {A_ZoomFactor(0.99,ZOOM_NOSCALETURNING); A_SetPitch(pitch - 0.18); A_FireBullets(3.5, 3, -1, random(38,44), "Duke_Puff",FBF_NORANDOM|FBF_USEAMMO); A_PlaySound("Weaps/Revolver", CHAN_WEAPON);A_GunFlash();} WP14 C 1 Bright A_WeaponReady(14); WP14 C 1 Bright A_WeaponOffset(2.4,1,WOF_ADD); TNT1 A 0 A_ZoomFactor(1,ZOOM_NOSCALETURNING); WP14 D 1 A_WeaponReady(14); TNT1 A 0 A_SetPitch(pitch - 0.9); WP14 D 2 A_WeaponOffset(2,0.4,WOF_ADD); WP14 E 1 A_WeaponReady(14); TNT1 A 0 A_WeaponOffset(-2,-0.4,WOF_ADD); WP14 E 2 A_WeaponOffset(2,0.4,WOF_ADD); TNT1 A 0 A_WeaponOffset(-2,-0.4,WOF_ADD); TNT1 A 0 {invoker.Shact = invoker.Shact + 1;} WP14 DB 1 A_WeaponReady(14); WP14 A 2 A_WeaponReady(14); TNT1 A 0 A_JumpIf(invoker.Shact > 5,"ReloadForReal"); Goto RReady; Reload: TNT1 A 0 A_JumpIf(invoker.Shact < 1, "RReady"); TNT1 A 0 A_JumpIf(GetCVAR("duke_reload") == 0, "RReady"); ReloadForReal: TNT1 A 0 {invoker.Shact = 0; A_PlaySound("Weaps/RevolverReload", CHAN_AUTO);} WP14 D 4; WP14 DEE 1 A_WeaponOffset(0.2,12,WOF_ADD); WP14 EEEEEE 2 A_WeaponOffset(0.2,12,WOF_ADD); WP14 E 20 A_WeaponOffset(0,0,WOF_ADD); WP14 EEEDDD 2 A_WeaponOffset(-0.2,-12,WOF_ADD); WP14 DDD 1 A_WeaponOffset(-0.2,-12,WOF_ADD); TNT1 A 0; WP14 A 5 A_WeaponOffset(0,0,WOF_ADD); Goto RReady; Flash: TNT1 A 1 Bright A_Light1; TNT1 A 1 Bright A_Light0; Goto LightDone; Spawn: WP14 X -1; Stop; } }
Weapon and Overlay offsets problem
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.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
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.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
Ahpiox
- Posts: 98
- Joined: Fri Dec 22, 2017 1:52 am
Weapon and Overlay offsets problem
Whenever i use A_WeaponOffset, overlay offsets too. So, if you reloading weapon, Quick Kick, which is overlay, falls down with the weapon. A_OverlayFlags with PSPF_ADDWEAPON and other flags doesn't help at all.
Spoiler: