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

Not able to pickup my custom weapon

Recommended Posts

Right now I'm getting into making custom weapons/sprites. I read through the part on GunLabs about making custom sprites. 

I know how to code the guns but not able to get the sprites to show up on my screen. I copied and pasted the auto shotgun script and placed it into my custom sprite decorate. Even change the names of the gun to how it's supposed to say.

 

Here's the text.

ACTOR Power Shotgun : Weapon replaces Chainsaw        
{
Inventory.PickupMessage "You got the Power Shotgun!, HOT DOG!."
Weapon.AmmoType "Shell"
Weapon.AmmoUse 4
Weapon.AmmoGive
Weapon.Slotnumber 3
States
{
Spawn:
TSTG A -1
Stop
Ready:
TSTG A 1 A_WeaponReady
Loop
Select:
TSTG A 1 A_Raise
Loop
Deselect:
TSTG A 1 A_Lower
Loop
Fire:
TSTG A 0 A_GunFlash
TSTG A 1 A_Firebullets (5.5, 3, 6, 8, 1)
TSTG A 1 Offset(0,40)
TSTG A 1 Offset(0,48)
TSTG A 1 Offset(0,44)
TSTG A 1 Offset(0,40)
TSTG A 1 Offset(0,37)
TSTG A 1 Offset(0,35)
Goto Ready
Flash:
TSTF A 2 BRIGHT A_Light2
TSTF A 2 BRIGHT A_Light1
TNT1 A 1 A_Light0 
Goto LightDone
{

 

And Here's the weapon 

Capture.PNG.e97d6e70fb1f712a297326377fbd1c2b.PNGwhat I want to see in the game

 

Share this post


Link to post

You set the pickup to the hud weapon sprite which is floating some where above or below you in game. 

You need to add in a pickup sprite (I made this one if you want to use it) between the SS_Start and SS_End, name it something like TSTSA0, and center it using the sprite orientation in offset. After that, change in the decorate code

 

Spawn:                     Spawn:
TSTG A -1      to        TSTS A -1 
Stop                         Stop

 

That should make it work.

 

ASHGA0.png.4141437434baffe72e2cc4088948ee89.png

 

example.PNG

Edited by Scüm-head

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
×