Custom weapon not showing up at all

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
vAethor
Posts: 93
Joined: Wed May 10, 2017 4:10 pm

Custom weapon not showing up at all

Post by vAethor »

Today I started making my first custom weapon, a rocket launcher replacement complete with original sprites (placeholders though, WAY too ugly to show here :P)

I have the following DECORATE code that currently just replaces the sprites with the new ones, and enables my own smoother, more varied animation:

Code: Select all

Actor GaussLauncher : RocketLauncher replaces RocketLauncher
{
	States
	{
		Ready:
		GAUS A 1 A_WeaponReady
		Loop
		
		Deselect:
		GAUS A 1 A_Lower
		Loop
		
		Select:
		GAUS A 1 A_Raise
		Loop
		
		Fire:
		GAUS B 4
		GAUS C 12 A_FireMissile
		GAUS B 8
		GAUS D 8
		GAUS A 4
		GAUS B 4
	}	
}
But when I run GZdoom and test it out by entering IDKFA and pressing the rocket launcher slot, absolutely nothing happens. It's as if both my original weapon and the vanilla rocket launcher have disappeared from existence.

I really need this fixed. Any help would be appreciated.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Custom weapon not showing up at all

Post by Matt »

Where are the sprites within the pk3?
vAethor
Posts: 93
Joined: Wed May 10, 2017 4:10 pm

Re: Custom weapon not showing up at all

Post by vAethor »

They're in the Sprites directory. I see no reason why this isn't working.
User avatar
Voros
Posts: 151
Joined: Fri Feb 03, 2017 11:47 pm

Re: Custom weapon not showing up at all

Post by Voros »

Not sure why it's not appearing. In other news, add a

Code: Select all

Goto Ready
at the end of the Fire state.
vAethor
Posts: 93
Joined: Wed May 10, 2017 4:10 pm

Re: Custom weapon not showing up at all

Post by vAethor »

Well I am officially frustrated. I don't know where to go next.

But what does Goto Ready do?
User avatar
Voros
Posts: 151
Joined: Fri Feb 03, 2017 11:47 pm

Re: Custom weapon not showing up at all

Post by Voros »

It goes to the Ready state eg I fire weapon (Fire state) and then it goes back to Ready state, ready to be fired again. If you hold down the fire button, it'll just loop the Fire state (by default).

Who knows? That one missing line might be the problem.
vAethor
Posts: 93
Joined: Wed May 10, 2017 4:10 pm

Re: Custom weapon not showing up at all

Post by vAethor »

Voros wrote:It goes to the Ready state eg I fire weapon (Fire state) and then it goes back to Ready state, ready to be fired again. If you hold down the fire button, it'll just loop the Fire state (by default).

Who knows? That one missing line might be the problem.
I actually solved the problem. I needed to put Weapon.SlotNumber for Doom to recognize it. It's 5 in this case, since that is the one used by the rocket launcher.

And thanks for telling me about Ready.
User avatar
Voros
Posts: 151
Joined: Fri Feb 03, 2017 11:47 pm

Re: Custom weapon not showing up at all

Post by Voros »

Seriously? Weapon.SlotNumber is already defined in RocketLauncher, so why was that needed? You're inheriting everything from RocketLauncher, including Weapon.SlotNumber.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Custom weapon not showing up at all

Post by wildweasel »

Voros wrote:Seriously? Weapon.SlotNumber is already defined in RocketLauncher, so why was that needed? You're inheriting everything from RocketLauncher, including Weapon.SlotNumber.
Weapon slots do not get inherited.
User avatar
Voros
Posts: 151
Joined: Fri Feb 03, 2017 11:47 pm

Re: Custom weapon not showing up at all

Post by Voros »

wildweasel wrote:
Voros wrote:Seriously? Weapon.SlotNumber is already defined in RocketLauncher, so why was that needed? You're inheriting everything from RocketLauncher, including Weapon.SlotNumber.
Weapon slots do not get inherited.
That's a shame. What else doesn't get inherited?
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Custom weapon not showing up at all

Post by Nevander »

Voros wrote:That's a shame. What else doesn't get inherited?
Decals don't either. Like when you shoot a hitscan at a wall.
Locked

Return to “Editing (Archive)”