Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Thfpjct

I Making a Pistol that Reloads, but something is very wrong

Question

Posted (edited)

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 Thfpjct

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 0
14 hours ago, Thfpjct said:

GMPI A 0 A_Gunflash ("FLASH")

Unless this is fine for DECORATE, its best that only TNT1 is set to 0. Only error I can see so far.

Share this post


Link to post
  • 0
46 minutes ago, DynamiteKaitorn said:

Unless this is fine for DECORATE, its best that only TNT1 is set to 0. Only error I can see so far.

I tryed Changing but it didn't make any difference.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×