Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
A person

My custom weapons won't appear in-game

Recommended Posts

Posted (edited)

Everything is fixed now, you no longer need to look at this post.

Edited by A person : Fixed

Share this post


Link to post

Isn't the weapon pickup itself typically just a seperate single state "thing" (world object, like an entity) that has the pickupable flag set?

 

If so have you made the actual weapon "thing" yet? That sounds like the problem.

Share this post


Link to post

What happens if you type "give yourweaponname" in the console?  That gives it to the player without needing to spawn it.

 

But yes, post your Decorate code. That's the only way we can easily spot what's wrong.

Share this post


Link to post

I tried that and no luck, it seems like it's just disappeared from the game entirely, along with the shotgun (Which my weapon replaces)

Share this post


Link to post

I really need help with this, if anyone could respond with anything it would at least reassure me that people are seeing this.

 

Share this post


Link to post
Posted (edited)

Ok. So, you made some errors in your DECORATE. I'll correct them, and reupload with comments.

 

Edit: Why did you make a new player class? It's unnecessary. Also, you didn't have a SS_END.

 

Also, your sprites aren't following the Doom Sprite naming conventions.

 

Final thoughts: I cleaned your code a bit, but its still pretty nasty, no offense. Also, I'm fairly sure that you didn't name your sprites correctly. All in all, I recommend asking for hlep again.

HuntingRifle.zip

Edited by StevenC21

Share this post


Link to post
Posted (edited)

I think you should tell the game your Player is going to use that gun.  I've used different methods from assigning them to the DoomPlayer Actor, to assigning them on MapInfo/GameInfo lumps... but the method that usually works to me is to define the weapon slot on a KeyConf file adding some lines like i.e:

  weaponsection "HunterRifle"

  addslotdefault 3 HuntingRifle

 

I've attached an example custom gun, taken from Realm667, hope that might help you

SPAS-12.wad.zip

Share this post


Link to post

@StevenC21

I am fairly sure I named my sprites correctly, first off, and second, I tried your fixed code (Sorry it was ugly to you, I actually prefer that) and it still didn't show in game, darn.

Share this post


Link to post
Posted (edited)

wow, the ultra-rare triple post :o

 

Anyways, you should try to be less passive aggressive when people are trying to help you, and you should also probably try posting questions like these in the correct subforums.

But here, I fixed it: awful.zip

 

I formatted and fixed your code and sprites, as well as added a spawn sprite and a firing sound, since I'm sure those would have been your next questions. I also changed your sprite offsets.

On top of that, I added SNDINFO and KEYCONF files, but I'm not sure if they're needed or not.

 

I've literally never learned or used DECORATE before. I just opened up a working custom weapon (duke shotgun, as seen in the spawn sprite) and StevenC21's file and used them as references, so I dunno if it's totally fixed or not.

Happy birthday.

Share this post


Link to post

Yeah, I probably should've added a spawn sprite, I didn't intend to have sound until I was sure it showed in game, but I appreciate your help anyway, thanks a ton, I'll make sure to see what went wrong.

Share this post


Link to post
2 hours ago, A person said:

Yeah, I probably should've added a spawn sprite, I didn't intend to have sound until I was sure it showed in game, but I appreciate your help anyway, thanks a ton, I'll make sure to see what went wrong.

I think the point is not precisely to add a "Spawn sprite", you can use and reuse sprites whenever you want even with one sprite you can simulate the weapon recoil with "Offset(x,y)".  The point is to add a "Spawn State" usually needed for a gun to work.
I suggest you to use https://zdoom.org/wiki/Creating_new_weapons   the ZDoom Wiki is very helpful, I'm constantly reading their reference content ;)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×