Jump to content

Need help mancubus gun


Recommended Posts

Hello,I am asking for help because I am trying to make a gun that fires mancubus fireballs. For the most part it works, but when I shoot the camera snaps to a random place. Do you know how to make so it shoots where the camera looks at ?

 

my decorate file. the "FTGGA0" LAUNA0.png.3b60a5a0be5ebef2df5a224599fc05ac.png (placeholder) is the sprite for when it's on the ground, "FATGA0"  is  when it's in it's normal state and "FATGB0" is when it's being shot.

 

ACTOR mancubusgun : weapon 15002
{
    weapon.ammotype "Cell"
    weapon.ammouse 20
    weapon.ammogive 40
    tag "Mancubus gun"
    obituary "%o got burnt by %k's macubus gun."
    inventory.pickupmessage "You got the mancubus gun !"
    weapon.slotnumber 6
    states
{
    ready:
    FATG A 1 A_weaponready
    loop
    select:
    FATG A 1 A_raise
    loop
    deselect:
    FATG A 1 A_lower
    loop
    fire:
    FATG A 20 A_fatraise
    FATG B 10 A_fatattack1
    FATG A 10
    FATG B 10 A_fatattack2
    FATG A 10
    FATG B 10 A_fatattack2
    FATG A 10
    FATG A 3 A_refire
    goto ready
    spawn:
    FTGG A -1
    stop
}
}

 

thanks for your response

Share this post


Link to post

The problem is you seem to have just copied the Mancubus' attacks.  Monster attacks work differently from the player's weapons. 

 

Specifically, I think the issue is with "A_FATRAISE." That makes the actor face the target. When the actor is a Mancubus, that just means it rotates to whatever it's about to attack.  But since in this case the actor is a weapon... frankly I'm not even sure what GZDoom would consider its target to be because player weapons don't work that way.  Most likely the camera snapping you're noticing is it facing 0,0.

 

You need to delete that.  Of course, without A_fatraise, A_fatattack isn't really going to have anything to do because it needs the target A_fatraise gives it. They're sort of made to go together.  You should instead replace those with an A_FireProjectile that mimics the mancubus attack angles and uses the "Fatshot" missile.

Share this post


Link to post

thanks a lot for this exenation. The weird thing is that when I didn't used fatraise (before making this post) I needed to spawn a mancubus near me.

I am new to decorate coding, is it how we write it ?

 

FATG B 10 A_fireprojectile fatshot

 

or

 

FATG B 10 A_fireprojectile (fatshot) ?

Share this post


Link to post
1 hour ago, ShallowB said:

The problem is you seem to have just copied the Mancubus' attacks.  Monster attacks work differently from the player's weapons. 

I wrote it all by hand btw.

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
Reply to this topic...

×   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...