Can someone help me figure out why my zoom is broken? I had already made this gun and then followed a tutorial to allow the player to aim down the sights. The sprites for the rifle getting closer to the camera, and for the zoomed rifle firing, will not show and instead are blank. Also once I zoom in the only way to zoom out is to switch weapons. If I right click it will zoom out and then back in right away and I can't figure out why it's doing this.
ACTOR Rifle : Pistol
{
inventory.pickupmessage "You got the Rifle!"
weapon.bobstyle alpha
weapon.bobrangex 0.5
weapon.bobrangey 1.0
weapon.bobspeed 2.5
decal "bulletchip"
states
{
Spawn:
Rifl a -1
stop
Ready:
TNT1 A 0 A_JumpIfInventory("RifleZoomed",1,"ReadyZoomed")
RIF2 A 1 A_WeaponReady
Loop
ReadyZoomed:
RIFZ A 1 A_WeaponReady
Goto Ready
Deselect:
TNT1 A 0 A_TakeInventory("RifleZoomed",1)
TNT1 A 0 A_ZoomFactor(1)
TNT1 AAAAAAAA 0 A_Lower
RIFS ABCD 1
Loop
Select:
TNT1 A 10
TNT1 A 0 A_PlaySound("weapons/rifle/select")
TNT1 AAAAAAAA 0 A_Raise
RIFS ABCD 1 A_WeaponReady(WRF_NOFIRE)
Goto Ready
Fire:
RIF2 A 0 A_JumpIfInventory("RifleZoomed",1,"FireZoomed")
RIF2 A 1
RIF2 B 1
TNT1 A 0 A_PlaySound("weapons/rifle/fire", CHAN_WEAPON)
RIF2 C 1 bright A_FireBullets (6.2, 7.0, 1, 3, "BulletPuff")
TNT1 A 0 A_ReFire
RIF2 D 2 bright
RIF2 E 2
RIF2 F 2
RIF2 G 2
RIF2 H 1
RIF2 A 2
Goto Ready
FireZoomed:
TNT1 A 0 A_PlaySound("weapons/rifle/fire", CHAN_WEAPON)
RIFZ FGH 2 bright A_FireBullets(0,0,1,5,"BulletPuff",1)
TNT1 A 0 A_ReFire
Goto Ready
Altfire:
RIF2 A 0 A_JumpIfInventory("RifleZoomed",1,"UnZoom")
RIF2 A 0 A_GiveInventory("RifleZoomed",1)
TNT1 A 0 A_ZoomFactor(2)
RIFZ ABCDEFGH 1
Goto Ready
UnZoom:
TNT1 A 0 A_TakeInventory("RifleZoomed",1)
TNT1 A 0 A_ZoomFactor(1)
Goto Ready
Flash:
TNT1 B 2 Bright A_Light2
TNT1 A 1 Bright A_Light1
Goto LightDone
}
}
Can someone help me figure out why my zoom is broken? I had already made this gun and then followed a tutorial to allow the player to aim down the sights. The sprites for the rifle getting closer to the camera, and for the zoomed rifle firing, will not show and instead are blank. Also once I zoom in the only way to zoom out is to switch weapons. If I right click it will zoom out and then back in right away and I can't figure out why it's doing this.
ACTOR Rifle : Pistol { inventory.pickupmessage "You got the Rifle!" weapon.bobstyle alpha weapon.bobrangex 0.5 weapon.bobrangey 1.0 weapon.bobspeed 2.5 decal "bulletchip" states { Spawn: Rifl a -1 stop Ready: TNT1 A 0 A_JumpIfInventory("RifleZoomed",1,"ReadyZoomed") RIF2 A 1 A_WeaponReady Loop ReadyZoomed: RIFZ A 1 A_WeaponReady Goto Ready Deselect: TNT1 A 0 A_TakeInventory("RifleZoomed",1) TNT1 A 0 A_ZoomFactor(1) TNT1 AAAAAAAA 0 A_Lower RIFS ABCD 1 Loop Select: TNT1 A 10 TNT1 A 0 A_PlaySound("weapons/rifle/select") TNT1 AAAAAAAA 0 A_Raise RIFS ABCD 1 A_WeaponReady(WRF_NOFIRE) Goto Ready Fire: RIF2 A 0 A_JumpIfInventory("RifleZoomed",1,"FireZoomed") RIF2 A 1 RIF2 B 1 TNT1 A 0 A_PlaySound("weapons/rifle/fire", CHAN_WEAPON) RIF2 C 1 bright A_FireBullets (6.2, 7.0, 1, 3, "BulletPuff") TNT1 A 0 A_ReFire RIF2 D 2 bright RIF2 E 2 RIF2 F 2 RIF2 G 2 RIF2 H 1 RIF2 A 2 Goto Ready FireZoomed: TNT1 A 0 A_PlaySound("weapons/rifle/fire", CHAN_WEAPON) RIFZ FGH 2 bright A_FireBullets(0,0,1,5,"BulletPuff",1) TNT1 A 0 A_ReFire Goto Ready Altfire: RIF2 A 0 A_JumpIfInventory("RifleZoomed",1,"UnZoom") RIF2 A 0 A_GiveInventory("RifleZoomed",1) TNT1 A 0 A_ZoomFactor(2) RIFZ ABCDEFGH 1 Goto Ready UnZoom: TNT1 A 0 A_TakeInventory("RifleZoomed",1) TNT1 A 0 A_ZoomFactor(1) Goto Ready Flash: TNT1 B 2 Bright A_Light2 TNT1 A 1 Bright A_Light1 Goto LightDone } }
Share this post
Link to post