Spoiler:for some reason this code results in the death animation of the player to not play when killed using this "weapon" instead it plays the fire then idle frame. If could someone please tell me why and possibly offer a solution? I'd be most grateful!Code: Select all
ACTOR bikelauncher { Radius 1 Height 1 PROJECTILE +NOCLIP Scale 0.5 vspeed 0 Speed 8 RENDERSTYLE normal -nogravity gravity 1 -randomize States { Spawn: bike zzzzzzzzz 1 BRIGHT goto death death: tnt1 a 1 a_spawnitem("bike") stop } } ACTOR bike : DoomWeapon { +WEAPON.DONTBOB Inventory.PickupMessage "bike acquired" Obituary "%o got hit and run by %k." inventory.pickupsound "weapons/holster" Weapon.UpSound "weapons/HOLSTER" +noextremedeath scale 0.5 States { Ready: tnt1 A 0 A_JumpIfInventory("bikespeed",1,"ready1") bike A 0 A_alertmonsters bike A 0 A_PlayweaponSound("bike/idle") bike A 2 A_WeaponReady bike A 0 a_takeinventory("bikeSpeed",1) Loop ready1: bike A 0 A_alertmonsters bike A 0 A_PlayweaponSound("bike/idle") bike A 2 A_recoil(1) bike A 2 A_WeaponReady bike A 0 a_takeinventory("bikeSpeed",1) goto ready Deselect: TNT1 A 0 A_TAKEInventory("bikeSELECTED",9999) TNT1 A 0 A_takeInventory("bikeSlowness") TNT1 A 0 A_takeInventory("bikeSpeed",9999) bike A 0 A_stopsound(7) bike A 0 a_firecustommissile("bikelauncher") goto deselectmain deselectmain: bike A 0 A_Lower bike A 1 A_Lower bike A 0 a_takeinventory("bike") Loop Select: TNT1 A 0 A_GiveInventory("bikeSELECTED") TNT1 A 0 A_GiveInventory("bikeSlowness") bike A 0 A_Raise bike A 1 A_Raise Loop Fire: TNT1 A 0 A_JumpIfInventory("bikespeed",1,"fire2") bike A 0 A_quake(1,6,0,1,"NO/SOUND") bike A 0 A_PlayweaponSound("bike/run") bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike A 2 A_recoil(-2) bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike A 0 A_recoil(-2) bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike A 2 A_recoil(-2) bike A 0 a_custompunch(1,0,0,"bikepuff",64) TNT1 A 0 A_GiveInventory("bikeSpeed",1) bike A 0 a_refire goto ready fire2: bike A 0 A_quake(1,6,0,1,"NO/SOUND") TNT1 A 0 A_JumpIfInventory("bikespeed",2,"fire3") bike A 0 A_PlayweaponSound("bike/run1") bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike b 2 A_recoil(-3) bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike A 2 A_recoil(-3) bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike b 2 A_recoil(-3) bike A 0 a_custompunch(1,0,0,"bikepuff",64) TNT1 A 0 A_GiveInventory("bikeSpeed",1) bike A 0 a_refire goto ready fire3: bike A 0 A_quake(1,6,0,1,"NO/SOUND") TNT1 A 0 A_JumpIfInventory("bikespeed",3,"fire4") bike A 0 A_PlayweaponSound("bike/run2") bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike b 2 A_recoil(-4) bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike c 2 A_recoil(-4) bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike b 2 A_recoil(-4) bike A 0 a_custompunch(1,0,0,"bikepuff",64) TNT1 A 0 A_GiveInventory("bikeSpeed",1) bike A 0 a_refire goto ready fire4: bike A 0 A_quake(1,6,0,1,"NO/SOUND") TNT1 A 0 A_JumpIfInventory("bikespeed",4,"fire5") bike A 0 A_PlayweaponSound("bike/run3") bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike b 2 A_recoil(-5) bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike c 2 A_recoil(-5) bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike b 2 A_recoil(-5) bike A 0 a_custompunch(1,0,0,"bikepuff",64) TNT1 A 0 A_GiveInventory("bikeSpeed",1) bike A 0 a_refire fire5: bike A 0 A_quake(1,6,0,1,"NO/SOUND") bike A 0 A_PlayweaponSound("bike/run4") bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike c 2 A_recoil(-6) bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike d 2 A_recoil(-6) bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike c 2 A_recoil(-6) bike A 0 a_custompunch(1,0,0,"bikepuff",64) bike A 0 a_refire goto ready AltFire: bike A 0 A_PlayweaponSound("bike/stop") bike A 0 A_FireCustomMissile("overheatsmoker",0,0,0,-15) bike A 2 A_recoil(2) TNT1 A 0 A_takeInventory("bikeSpeed",1) goto ready Spawn: bike z -1 Stop } } ACTOR bikeSpeed : Inventory { Inventory.MaxAmount 4 } ACTOR bikepuff { +noextremedeath damagetype "bouncer" } actor bikeSlowness : PowerSpeed { Speed 0 Powerup.Duration 0x7FFFFFFF Inventory.Icon "" +POWERSPEED.NOTRAIL } Actor BIKESELECTED : Inventory { }
[decorate] help! Issues with decorate 'vehicle'
Moderator: GZDoom 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.
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!)
-
- Posts: 2058
- Joined: Mon Feb 07, 2011 5:02 am
[decorate] help! Issues with decorate 'vehicle'
Spoiler:for some reason this code results in the death animation of the player to not play when killed using this "weapon" instead it plays the fire then idle frame. If could someone please tell me why and possibly offer a solution? I'd be most grateful!