Alright, I fixed the issues I believe. For some reason I believed you had to had the original DoomPlayer class in there with "nomenu". I thought I read that in the wiki. Well, I took it out so now it works fine. You always start with my guy.
As for the weird gun problems and IDFA, I solved that by changing all of my counter actors from Ammo to Inventory. That solved it. Of course, if there's a "full inventory" code too, then I don't know what to do.
Now, I had an odd problem with the plasma rifle. It seems that after you pick one up (not start with one), it won't reload until you switch to another weapon and back. I'm not quite sure what the deal is there. Here's my code for the plasma rifle:
Code: Select all
actor FastPlasmaRifle : Weapon replaces PlasmaRifle
{
spawnid 30
radius 20
height 16
inventory.pickupmessage "You got the plasma gun!"
inventory.pickupsound "item/gunpickup"
weapon.selectionorder 100
weapon.kickback 100
weapon.ammotype1 "Cell"
weapon.ammotype2 "CellCount"
weapon.ammouse1 0
weapon.ammouse2 0
weapon.ammogive1 40
weapon.ammogive2 0
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 0 A_TakeInventory("LoadCount3", 1)
PLSG A 0 A_JumpIfInventory("CellCount", 1, 4)
PLSG A 0 A_PlayWeaponSound("fire/gunclick")
PLSG A 3
PLSG A 0 A_ReFire
goto Ready
PLSG A 0 A_FireCustomMissile ("PlasmaBall")
PLSG A 0 A_PlayWeaponSound("fire/plsgfire")
PLSG A 0 A_TakeInventory("CellCount", 1)
PLSG A 0 A_JumpIfInventory("CellCount", 1, 3)
PLSG A 0 A_PlaySound("load/plsgdsch")
PLSG A 0 A_GiveInventory("EmptyCount3", 1)
PLSG A 3 A_GunFlash
goto Ready
AltFire:
PLSG A 0 A_JumpIfInventory("CellCount", 30, 2)
PLSG A 0 A_JumpIfInventory("Cell", 1, 2)
PLSG A 0
goto Ready
PLSG A 0 A_GiveInventory("LoadCount3", 1)
PLSG CD 3
PLSG E 0 A_JumpIfInventory("EmptyCount3", 1, 3)
PLSG E 0 A_TakeInventory("CellCount", 1)
PLSG E 0 A_PlaySound("load/plsgdsch")
PLSG E 4 A_PlayWeaponSound("load/plsgunld")
PLSG F 4
PLSG I 20
PLSG F 4
PLSG E 4 A_PlayWeaponSound("load/plsgreld")
PLSG G 4
PLSG A 0 A_GiveInventory("CellCount", 1)
PLSG A 0 A_TakeInventory("Cell", 1)
goto AltHold
AltHold:
PLSG A 0 A_JumpIfInventory("LoadCount3", 1, 1)
goto Ready
PLSG A 0 A_JumpIfInventory("CellCount", 30, 5)
PLSG A 0 A_JumpIfInventory("Cell", 1, 2)
PLSG A 0 A_Jump(256, 3)
PLSG A 0 A_GiveInventory("CellCount", 1)
PLSG A 0 A_TakeInventory("Cell", 1)
goto AltHold
PLSG H 0 A_PlaySound("load/plsgchrg")
PLSG H 2 A_PlayWeaponSound("load/plsgcock")
PLSG H 0 A_TakeInventory("EmptyCount3", 1)
PLSG G 4
PLSG DC 3
PLSG C 0 A_TakeInventory("LoadCount3", 1)
goto Ready
Flash:
PLSF A 0 bright A_Jump (128, 3)
PLSF A 2 bright A_Light1
PLSF A 0 bright A_Light0
stop
PLSF B 2 bright A_Light1
PLSF B 0 bright A_Light0
stop
Spawn:
PLAS A -1
stop
}
}
actor EmptyCount3 : Inventory
{
inventory.amount 1
inventory.maxamount 1
}
actor LoadCount3 : Inventory
{
inventory.amount 1
inventory.maxamount 1
}
actor CellCount : Ammo
{
inventory.amount 1
inventory.maxamount 30
}
and then the DoomPlayer setup
Code: Select all
actor FastMarine : DoomPlayer
{
player.startitem FastPistol
player.startitem Fist
player.startitem Clip 50
player.startitem ClipCount 20
player.startitem BeltCount 200
player.startitem ChainCount 2
player.startitem ShellCount 8
player.startitem ShotCount 2
player.startitem RocketCount 2
player.startitem CellCount 30
player.startitem ChargeCount 40
}
As you can see, there's counters that handle things like how many shots are left in the magazine, whether or not the magazine is completely empty (this is needed to signify when extra loading effects are needed), as well as whether or not the gun is currently loading (this is necessary to avoid some weird bugs where it goes to the AltHold state when you hit reload instead of the AltFire state).
Those counters are used to do jumps. The AltFire state initializes the reloading process and does the first part of the animation, and then the AltHold state goes into a loop that keeps adding rounds until its maxed out or there's no extra rounds left. Then it completes the reload animation.
As you can see in the player setup, even though you don't have any of the guns to start with, you still start with their full magazines. Of course, you never see this until you pick up a gun. I might change this around a bit, depending on how much ammo a gun you pick up I think should come preloaded with.
So, can anyone see what the problem with the plasma rifle's reloading might be?