lonleyglobe0 wrote:I am in development of making a TC for doom, BUT! The custom weapon I made is not working. This is my first custom weapon. Whenever I place it on the map it comes up with a red triangle and a ! mark. And when I use IDKFA I cannot equip it.
Code: Select all
ACTOR Lewisgun : Weapon 666
{
Inventory.PickupMessage "You got the Lewis obliterator, Make it rain lead!"
Weapon.SelectionOrder 350
Weapon.AmmoType "Clip"
Weapon.AmmoUse 1
Weapon.AmmoGive 16
Weapon.SlotNumber 4
AttackSound "sounds/lewisgun"
States
{
Spawn:
LEWP A -1
Stop
Ready:
LEWS A 1 A_WeaponReady
Loop
Select:
LEWS A 1 A_Raise
Loop
Deselect:
LEWS A 1 A_Lower
Loop
Fire:
LEWS B 1 A_FireBullets(5.5, 3, 8, 4, "BulletPuff", 1)
LEWS C 1 A_FireBullets(5.5, 3, 8, 4, "BulletPuff", 1)
Goto Ready
Flash:
LEWS B 2 BRIGHT A_Light1
LEWS C A_Light0
Goto LightDone
}
}
Welcome,
You forgot to add "A_Refire" and "Goto Ready" at the end of the fire mode. The correct way is below.
Code: Select all
Fire:
LEWS B 1 A_FireBullets(5.5, 3, 8, 4, "BulletPuff", 1)
LEWS C 1 A_FireBullets(5.5, 3, 8, 4, "BulletPuff", 1)
LEWS C 1 A_Refire
Goto Ready
Here is also an excellent resource for Doom Coding with regards to items, weapons, and sprites.
http://gunlabs.blogspot.com/
Good luck in your TC.