lizardcommando wrote:In order to change the weapon select speed, would I just need to change the amount of frames/tics in the Select and Deselect parts of the coding?
Also, whan I was trying to change the level counter max to 60, it seems to have disrupted how the charging sounds would play. It would play fine the first time, but after charging my weapons the second time around, it wouldn't play the sound effect.
actor ZBuster : Weapon replaces Pistol
{
obituary "%o was blasted by %k's Z-Buster."
attacksound "omegazero/zbuster"
weapon.selectionorder 1900
weapon.kickback 100
weapon.ammouse 0
states
{
Ready:
ZBUS A 1 A_WeaponReady
loop
Deselect:
ZBUS A 1 A_Lower
loop
Select:
TNT1 A 0
TNT1 A 0 A_TakeInventory("LevelCounter",60)
TNT1 A 0 A_TakeInventory("FrameCounter",7)
TNT1 A 0 A_TakeInventory("FrameIdle",5)
ZBUS A 1 A_Raise
Wait
Fire:
ZBUS A 1
ZBSF A 2 BRIGHT A_FireCustomMissile("ZBustershot",0,0,4,7,0)
ZBSF B 2 BRIGHT
ZBSF C 2
ZBUS A 1 A_ReFire
goto Ready
AltFire:
ZBUS A 2
AltHold:
TNT1 A 0 A_GiveInventory("FrameIdle",1) //increment the frame duration
TNT1 A 0 A_GiveInventory("LevelCounter",1)
TNT1 A 0 A_JumpIfInventory("LevelCounter",56,"Level3Loop")
Level0Charge:
TNT1 A 0 A_JumpIfInventory("LevelCounter",5,"Level1Charge")
TNT1 A 0 A_JumpIfInventory("FrameIdle",0,1) //check frame duration
Goto Display
TNT1 A 0 A_TakeInventory("FrameIdle",5)
Goto FrameCheck
Level1Charge:
TNT1 A 0 A_JumpIfInventory("LevelCounter",12,"Level2Charge")
TNT1 A 0 A_JumpIfInventory("LevelCounter",6,2) //First time here?
TNT1 A 0 A_PlaySound("omegazero/zbcharge1",CHAN_WEAPON,1,1)
TNT1 A 0 A_JumpIfInventory("FrameIdle",3,1) //check frame duration
Goto Display
TNT1 A 0 A_TakeInventory("FrameIdle",5)
Goto FrameCheck
Level2Charge:
TNT1 A 0 A_JumpIfInventory("FrameIdle",2,1)
Goto Display
TNT1 A 0 A_TakeInventory("FrameIdle",5)
Goto FrameCheck
Level3Loop:
TNT1 A 0 A_JumpIfInventory("LevelCounter",0,2) //First time here?
TNT1 A 0 A_PlaySound("omegazero/zbcharge2",CHAN_WEAPON,1,1)
TNT1 A 0 A_JumpIfInventory("FrameIdle",1,1)
Goto Display
TNT1 A 0 A_TakeInventory("FrameIdle",5)
Goto FrameCheck
FrameCheck:
TNT1 A 0 A_GiveInventory("FrameCounter",1)
TNT1 A 0 A_JumpIfInventory("FrameCounter",0,1) //check frame letter
Goto Display
TNT1 A 0 A_TakeInventory("FrameCounter",7)
Goto Display
Display:
TNT1 A 0 A_JumpIfInventory("LevelCounter",0,"FullDisplay")
TNT1 A 0 A_JumpIfInventory("FrameCounter",1,3)
ZBCH A 1 BRIGHT
TNT1 A 0 A_Refire
Goto ShotSelect
TNT1 A 0 A_JumpIfInventory("FrameCounter",2,3)
ZBCH B 1 BRIGHT
TNT1 A 0 A_Refire
Goto ShotSelect
TNT1 A 0 A_JumpIfInventory("FrameCounter",3,3)
ZBCH C 1 BRIGHT
TNT1 A 0 A_Refire
Goto ShotSelect
TNT1 A 0 A_JumpIfInventory("FrameCounter",4,3)
ZBCH D 1 BRIGHT
TNT1 A 0 A_Refire
Goto ShotSelect
TNT1 A 0 A_JumpIfInventory("FrameCounter",5,3)
ZBCH E 1 BRIGHT
TNT1 A 0 A_Refire
Goto ShotSelect
TNT1 A 0 A_JumpIfInventory("FrameCounter",6,3)
ZBCH F 1 BRIGHT
TNT1 A 0 A_Refire
Goto ShotSelect
ZBUS A 1 BRIGHT
TNT1 A 0 A_Refire
Goto ShotSelect
FullDisplay:
TNT1 A 0 A_JumpIfInventory("FrameCounter",1,3)
ZBCH G 1 BRIGHT
TNT1 A 0 A_Refire
Goto FullChargeShot
TNT1 A 0 A_JumpIfInventory("FrameCounter",2,3)
ZBCH H 1 BRIGHT
TNT1 A 0 A_Refire
Goto FullChargeShot
TNT1 A 0 A_JumpIfInventory("FrameCounter",3,3)
ZBCH I 1 BRIGHT
TNT1 A 0 A_Refire
Goto FullChargeShot
TNT1 A 0 A_JumpIfInventory("FrameCounter",4,3)
ZBCH J 1 BRIGHT
TNT1 A 0 A_Refire
Goto FullChargeShot
TNT1 A 0 A_JumpIfInventory("FrameCounter",5,3)
ZBCH K 1 BRIGHT
TNT1 A 0 A_Refire
Goto FullChargeShot
TNT1 A 0 A_JumpIfInventory("FrameCounter",6,3)
ZBCH L 1 BRIGHT
TNT1 A 0 A_Refire
Goto FullChargeShot
ZBCH G 1 BRIGHT
TNT1 A 0 A_Refire
Goto FullChargeShot
ShotSelect:
TNT1 A 0 A_JumpIfInventory("LevelCounter",12,"MidChargeShot")
TNT1 A 0 A_StopSound(CHAN_WEAPON)
ZBSF A 2 BRIGHT A_FireCustomMissile("ZBustershot",0,0,4,7,0)
ZBSF BC 2
ZBUS A 2
Goto CleanUp
MidChargeShot:
ZBMC A 3 BRIGHT A_PlaySound("omegazero/zbmidshot",CHAN_WEAPON)
ZBMC B 2 BRIGHT A_FireCustomMissile("ZBMidChargeShot",0,0,4,7,0)
ZBUS A 3
Goto CleanUp
FullChargeShot:
ZBUS A 1 BRIGHT A_StopSound(CHAN_WEAPON)
ZBFC A 3 BRIGHT A_PlaySound ("omegazero/zbusterfullshot",CHAN_WEAPON)
ZBFC B 2 BRIGHT A_FireCustomMissile("ZBFullChargeShot",0,0,4,6,0)
ZBFC C 2
ZBFC D 4
ZBCH A 2
CleanUp:
TNT1 A 0 A_TakeInventory("LevelCounter",60)
TNT1 A 0 A_TakeInventory("FrameCounter",7)
TNT1 A 0 A_TakeInventory("FrameIdle",5)
TNT1 A 0 A_Refire //!!!!!
goto Ready
}
}
lizardcommando wrote:Here is the coding for the ZBuster (the charge sequence is practically identical for the Z-Saber.)
(which is that the charging sound is not playing the second time the weapon is charging, right?)
TNT1 A 0 A_JumpIfInventory("LevelCounter",0,2) //First time here?
actor ZBuster : Weapon replaces Pistol
{
obituary "%o was blasted by %k's Z-Buster."
attacksound "omegazero/zbuster"
Weapon.SisterWeapon PoweredZBuster
weapon.selectionorder 1900
weapon.kickback 100
weapon.ammouse 0
actor PoweredZBuster : ZBuster
{
obituary "%o was blasted by %k's Z-Buster."
attacksound "omegazero/zbmidshot"
Weapon.SisterWeapon ZBuster
+POWERED_UP
weapon.selectionorder 1900
weapon.kickback 100
weapon.ammouse 0
ACTOR CyberElfPower : PowerWeaponLevel2 replaces Berserk
{
+FLOATBOB
+INVENTORY.PICKUPFLASH
Powerup.Duration 1000
Inventory.PickupMessage "Cyber Elf?! It's giving me great strength!"
States
{
Spawn:
CYEL ABCDEFGH 2 Bright
Loop
}
}
ACTOR DarkCyberElf : PowerUpGiver replaces Berserk
{
health 100
+FLOATBOB
+INVENTORY.PICKUPFLASH
powerup.type "PowerWeaponLevel2"
powerup.duration 130
Inventory.PickupMessage "Dark Cyber Elf?! It's giving me incredible strength!"
States
{
Spawn:
CYEL ABCDEFGH 2 Bright
Loop
}
}
+INVENTORY.AUTOACTIVATE
+INVENTORY.ALWAYSPICKUP
Inventory.MaxAmount 0
Users browsing this forum: bjork, rayburn and 9 guests