Jobleh Kassav Posted January 7, 2024 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" (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 0 Quote Share this post Link to post
ShallowB Posted January 7, 2024 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. 1 Quote Share this post Link to post
ViolentBeetle Posted January 7, 2024 I don't think fatraise has anything to do with acquiring target, but it indeed probably won't work correctly with player. 0 Quote Share this post Link to post
Jobleh Kassav Posted January 7, 2024 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) ? 0 Quote Share this post Link to post
Jobleh Kassav Posted January 7, 2024 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. 0 Quote Share this post Link to post
OnionTaco22 Posted January 7, 2024 Try A_FireProjectile(FatShot, 0,1). Or perhaps try converting it into zscript. You might find it easier. 0 Quote Share this post Link to post
Jobleh Kassav Posted January 7, 2024 wow it works thanks your the goat. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.