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.

Custom weapon not showing up at all

Postby vAethor » Thu Aug 31, 2017 6:34 pm

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 allExpand view
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.
vAethor
 
Joined: 10 May 2017

Re: Custom weapon not showing up at all

Postby Matt » Thu Aug 31, 2017 6:47 pm

Where are the sprites within the pk3?
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Custom weapon not showing up at all

Postby vAethor » Thu Aug 31, 2017 6:48 pm

They're in the Sprites directory. I see no reason why this isn't working.
vAethor
 
Joined: 10 May 2017

Re: Custom weapon not showing up at all

Postby Voros » Thu Aug 31, 2017 7:03 pm

Not sure why it's not appearing. In other news, add a
Code: Select allExpand view
Goto Ready
at the end of the Fire state.
User avatar
Voros
 
Joined: 03 Feb 2017

Re: Custom weapon not showing up at all

Postby vAethor » Thu Aug 31, 2017 7:17 pm

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

But what does Goto Ready do?
vAethor
 
Joined: 10 May 2017

Re: Custom weapon not showing up at all

Postby Voros » Thu Aug 31, 2017 7:19 pm

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.
User avatar
Voros
 
Joined: 03 Feb 2017

Re: Custom weapon not showing up at all

Postby vAethor » Thu Aug 31, 2017 7:30 pm

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.
vAethor
 
Joined: 10 May 2017

Re: Custom weapon not showing up at all

Postby Voros » Thu Aug 31, 2017 10:53 pm

Seriously? Weapon.SlotNumber is already defined in RocketLauncher, so why was that needed? You're inheriting everything from RocketLauncher, including Weapon.SlotNumber.
User avatar
Voros
 
Joined: 03 Feb 2017

Re: Custom weapon not showing up at all

Postby wildweasel » Thu Aug 31, 2017 10:58 pm

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
wildweasel
I pay the bills around here, I can talk about the control group all damn day
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: Custom weapon not showing up at all

Postby Voros » Thu Aug 31, 2017 11:37 pm

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?
User avatar
Voros
 
Joined: 03 Feb 2017

Re: Custom weapon not showing up at all

Postby Nevander » Thu Aug 31, 2017 11:44 pm

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.
Nevander
Self-Banned User
 
Joined: 06 Jan 2014


Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 1 guest