I don't know what is Happening with my game or with my Code.
It's a Pistol that Reload, but some flags don't work for some reason, and if i remove the flags from the code (the flags: Noautofire and Ammo_Optional) the weapon can't be hold in game, Like, i can summon the Pickup item, i can Pickup, but it won't let me choose it.
I still working on the reload. this problems had show up in the beginning of the codding but it wasn't bugging me of until now.
I am in the middle of the Gunlabs tutorial, and din't sayed anything about this kind problem happening.
Code:
Actor Revolverd : weapon
{
Obituary "%o Was Killed by %k Revolver'd"
Attacksound "SHOTTING/Pistolfire" //som do ataque/tiro
Inventory.pickupmessage "Pickup a Revolver"
Weapon.Slotnumber 2
Weapon.BobSpeed 1.3
Weapon.BobRangeX 1.0
Weapon.BobRangey 1.0
Weapon.BobStyle Inverse
Weapon.AmmoUse2 0
Weapon.AmmoType2 "6mm"
Weapon.AmmoGive2 20
Weapon.AmmoUse1 1
Weapon.AmmoType1 "REVReloaded"
Weapon.AmmoGive1 0
+Weapon.Noautofire
+Weapon.Ammo_Optional
STATES
{
SPAWN:
GMSP A -1
STOP
READY:
GMPI A 1 A_Weaponready(WRF_ALLOWRELOAD)
Loop
SELECT:
GMPI A 1 A_Raise
Loop
DESELECT:
GMPI A 1 A_Lower
Loop
FIRE:
GMPI B 1 A_FIREBULLETS(1,1,1,6,"BULLETPUFF")
TNT1 A 0 A_SetPitch(pitch-1.3)
TNT1 A 0 A_Gunflash ("FLASH")
GMPI C 2
GMPI A 5 A_REFIRE
GOTO READY
RELOAD:
RELO A 1
RELO B 1 A_Playsound ("DRYFIRE/Pistol")
RELO C 4
RELO D 4
RELO E 4
RELO F 4
RELO G 1
TNT1 A 0 A_GiveInventory("REVReloaded", 12)
TNT1 A 0 A_TakeInventory("6mm", 1)
GOTO Ready
FLASH:
MUZL A 1 BRIGHT A_Light(1)
GOTO LightDone
}
}
ACTOR 6mm : Ammo Replaces Clip
{
Inventory.PickupMessage "You Got ammo for Revolverd"
Inventory.Amount 5
Inventory.MaxAmount 100
Inventory.Pickupsound "BERETTA/drop"
Ammo.BackpackAmount 60
Ammo.BackpackMaxAmount 600
Inventory.Icon "CLIPA0"
STATES
{
SPAWN:
CLIP A -1
STOP
}
}
ACTOR REVReloaded : Ammo
{
Inventory.MaxAmount 12
+IGNORESKILL
}
I don't know what is Happening with my game or with my Code.
It's a Pistol that Reload, but some flags don't work for some reason, and if i remove the flags from the code (the flags: Noautofire and Ammo_Optional) the weapon can't be hold in game, Like, i can summon the Pickup item, i can Pickup, but it won't let me choose it.
I still working on the reload. this problems had show up in the beginning of the codding but it wasn't bugging me of until now.
I am in the middle of the Gunlabs tutorial, and din't sayed anything about this kind problem happening.
Code:
Actor Revolverd : weapon { Obituary "%o Was Killed by %k Revolver'd" Attacksound "SHOTTING/Pistolfire" //som do ataque/tiro Inventory.pickupmessage "Pickup a Revolver" Weapon.Slotnumber 2 Weapon.BobSpeed 1.3 Weapon.BobRangeX 1.0 Weapon.BobRangey 1.0 Weapon.BobStyle Inverse Weapon.AmmoUse2 0 Weapon.AmmoType2 "6mm" Weapon.AmmoGive2 20 Weapon.AmmoUse1 1 Weapon.AmmoType1 "REVReloaded" Weapon.AmmoGive1 0 +Weapon.Noautofire +Weapon.Ammo_Optional STATES { SPAWN: GMSP A -1 STOP READY: GMPI A 1 A_Weaponready(WRF_ALLOWRELOAD) Loop SELECT: GMPI A 1 A_Raise Loop DESELECT: GMPI A 1 A_Lower Loop FIRE: GMPI B 1 A_FIREBULLETS(1,1,1,6,"BULLETPUFF") TNT1 A 0 A_SetPitch(pitch-1.3) TNT1 A 0 A_Gunflash ("FLASH") GMPI C 2 GMPI A 5 A_REFIRE GOTO READY RELOAD: RELO A 1 RELO B 1 A_Playsound ("DRYFIRE/Pistol") RELO C 4 RELO D 4 RELO E 4 RELO F 4 RELO G 1 TNT1 A 0 A_GiveInventory("REVReloaded", 12) TNT1 A 0 A_TakeInventory("6mm", 1) GOTO Ready FLASH: MUZL A 1 BRIGHT A_Light(1) GOTO LightDone } } ACTOR 6mm : Ammo Replaces Clip { Inventory.PickupMessage "You Got ammo for Revolverd" Inventory.Amount 5 Inventory.MaxAmount 100 Inventory.Pickupsound "BERETTA/drop" Ammo.BackpackAmount 60 Ammo.BackpackMaxAmount 600 Inventory.Icon "CLIPA0" STATES { SPAWN: CLIP A -1 STOP } } ACTOR REVReloaded : Ammo { Inventory.MaxAmount 12 +IGNORESKILL }
My Pistol:
Pistol.zip
Edited by ThfpjctShare this post
Link to post