Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Flammable

[Resolved] Weapon Decorate Help

Recommended Posts

Hi, i having a problem with altfire. I want my plasmagun have altfire
and be something like plasma shotgun. The problem is that when Cells are out it still can shoot with zero ammo... How do i resolve it?

There is my code

//Weapon: Plasma2
//By: Flammable4444

ACTOR PlasmaRifle : DoomWeapon 2004
{
Game Doom
SpawnID 30
Weapon.SelectionOrder 100
Weapon.AmmoUse 1
Weapon.AmmoGive 50
Weapon.AmmoType "Cell"
Inventory.PickupMessage "$GOTPLASMA"
Tag "$TAG_PLASMARIFLE"
States
{
Ready:
PLSG A 1 A_WeaponReady
Loop
Deselect:
PLSG A 1 A_Lower
Loop
Select:
PLSG A 1 A_Raise
Loop
Fire:
PLSG A 3 A_FirePlasma
PLSG B 20 A_ReFire
Goto Ready
AltFire:
PLSF B 30
PLSG A 0 A_FireCustomMissile("PlasmaBall", 0, 1, 0, 0)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 5, 1, -1, 10)
PLSG A 0 A_FireCustomMissile("PlasmaBall", -7, 1, 3, 0)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 7, 1, -3, 0)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 5, 1, 1, -10)
PLSG A 0 A_FireCustomMissile("PlasmaBall", -5, 1, 1, 10)
PLSG A 0 A_FireCustomMissile("PlasmaBall", -5, 1, -1, -10)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 0, 1, 0, 0)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 5, 1, -1, 10)
PLSG A 0 A_FireCustomMissile("PlasmaBall", -7, 1, 3, 0)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 7, 1, -3, 0)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 5, 1, 1, -10)
PLSG A 0 A_FireCustomMissile("PlasmaBall", -5, 1, 1, 10)
PLSG A 0 A_FireCustomMissile("PlasmaBall", -5, 1, -1, -10)
PLSG A 0 A_TakeInventory("Cell", 20)
Goto Ready
Flash:
PLSF A 4 Bright A_Light1
Goto LightDone
PLSF B 4 Bright A_Light1
Goto LightDone
Spawn:
PLAS A -1
Stop
}
}

Share this post


Link to post

Try using Weapon.AmmoUse2 instead of Takeinventory.

Also set the Weapon.AmmoType2 property.

Share this post


Link to post
Krispy said:

Try using Weapon.AmmoUse2 instead of Takeinventory.

Also set the Weapon.AmmoType2 property.


Works just as it should work, You are awesome, realy :)

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
Sign in to follow this  
×