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

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Sergeant Hoppy
New User
Posts: 2
Joined: Sat Jun 19, 2021 7:18 pm
Location: Sweden

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

#1

Post by Sergeant Hoppy » Mon Jun 21, 2021 4:53 pm

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

User avatar
Ænima
Addicted to Zandronum
Posts: 3523
Joined: Tue Jun 05, 2012 6:12 pm

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

#2

Post by Ænima » Thu Jun 24, 2021 12:11 pm

You can’t have two actors with the exact same name. Pick a different name for the playerclass, maybe “FlamethrowerMarine”?
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: New weapons, monsters, and gameplay features for coop !


ZandroSkins
: a pack made by our community

OkDoomer174
New User
Posts: 3
Joined: Sat Jul 03, 2021 8:35 pm

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

#3

Post by OkDoomer174 » Sun Jul 04, 2021 2:27 am

Along with what Aenima said, you didn't close your first actor.

Post Reply