Jump to content
  • 0

Weapon pickup disappears after a second.


HollowKnightPOG

Question

I cannot figure out how to fix this. The weapon sprites work fine and appear as they should, but when I try to spawn one in the sprite appears for one tick before moving down into the ground.

Here is the code in slade:

 

ACTOR pocketcannon : weapon 15000
{
    weapon.selectionorder 1200
    weapon.ammouse 5
    weapon.ammotype "rocketammo"
    weapon.slotnumber 4
    weapon.ammogive 200
    inventory.pickupmessage "You got the pocket-cannon!"
    obituary "%o was eviserated by %k's pocket-cannon."
    Attacksound "minigun/shred"
    states
{
    ready:
        POCG A 1 A_weaponready
        loop
    select:
        POCG A 0 A_raise
        goto ready
    deselect:
        POCG A 0 A_lower
        loop
    fire:
        POCG A 4 A_Firemissile
        POCG B 4
        POCG C 4
        POCG D 4
        POCG E 4
        POCG D 4
        POCG B 4
        goto ready
        
    spawn:
        POCS A -1
}
}

 

Demonstration of issue:

 

 

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0
22 hours ago, HollowKnightPOG said:

The problem is still there after adding stop. I feel like maybe because its moving down could putting a texture offset maybe fix it?

Yeah. In SLADE there should be a little button that looks like this image.png.b04ae42c09bedc3de96e5d269bc53be5.png near the bottom of the screen when you select the pickup sprite. Click that, and then in the "Automatic offsets" list, select "Monster (GL-friendly)" and that should be good enough.

Share this post


Link to post
  • 0

    spawn:
        POCS A -1

see the other states that have "loop" or "goto [some state here]"? there should be a "stop" on the line after POCS A -1

Edited by SavebearingBoss

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...