Page 1 of 1

[DECORATE] First custom weapon, what am I doing wrong?

Posted: Mon Jun 21, 2021 4:53 pm
by Sergeant Hoppy
I'm having trouble with my custom weapon mod, and I don't know what's wrong, any pointers?

DECORATE:

Code: Select all

ACTOR Flamethrower: DoomPlayer {
	Player.WeaponSlot 1, Fist, Chainsaw
	Player.WeaponSlot 2, Pistol
	Player.WeaponSlot 3, Shotgun, SuperShotgun
	Player.WeaponSlot 4, Chaingun, Flamethrower
	Player.WeaponSlot 5, RocketLauncher
	Player.WeaponSlot 6, PlasmaRifle
	Player.WeaponSlot 7, BFG9000


ACTOR Flamethrower: Weapon {
	Weapon.SelectionOrder 50
	Weapon.AmmoUse 10
	Weapon.AmmoGive 100
	Weapon.AmmoType "Clip"
	AttackSound "weapons/pistol"
}
	States
	{
		Ready:
		HSKL A 1 A_WeaponReady
		Loop
		Select:
		HSKL E 1 A_Raise
		Loop
		Deselect:
		HSKL E 1 A_Lower
		Loop
		Spawn:
		SKLL A  1
		Loop
		Fire:
		MISG B 3 A_FireCustomMissile("FatShot", 0.0, true, 0.0, -2.0, 0, 0.0)
		Goto Ready
	}
}
MAPINFO:

Code: Select all

gameinfo {
	playerclasses = "Flamethrower"
}

Error message loading the mod:

Code: Select all

Tried to register class 'FlameThrower' more than once.

Execution could not continue.

Script error, "Flamethrower.pk3:decorate.txt" line 11:
"actor" is an unknown actor property

[DECORATE] Re: First custom weapon, what am I doing wrong?

Posted: Thu Jun 24, 2021 12:11 pm
by Ænima
You can’t have two actors with the exact same name. Pick a different name for the playerclass, maybe “FlamethrowerMarine”?

[DECORATE] Re: First custom weapon, what am I doing wrong?

Posted: Sun Jul 04, 2021 2:27 am
by OkDoomer174
Along with what Aenima said, you didn't close your first actor.