So I’ve figured out how to make my character “shoot” (emit). I know how to make my character turn around or rotate to shoot in different directions that way. But how do I make an attached weapon that moves independently from the sprite itself and shoots in the direction it’s pointing at? Like if I have a guy running around with a gun, and I need to shoot something in the sky, how do I make the gun point up at the sky without making the character itself bend awkwardly backwards?
I’m okay with either keyboard or mouse guided aiming, either one works, I just want an attached emitting weapon that moves independently of my player sprite.
For reference: I’m currently making a war game with tanks and stuff. I want their turrets to be able to point in different directions without moving / spinning the tank itself. I also want enemy soldiers to be able to point their guns at me when firing at me without the entire sprite having to rotate to face me - just the gun itself.
That’s the thing, I’m not sure how to make an arm object. I’m guessing I have to make it outside of the playable screen, then attach it to the player sprite, but I’ve never done that before… and I’ll need to make it look right when it’s connected. Do you have an example I could see?
Cool! I tried to check out another game as an example, but I couldn’t figure out his code… it was all hidden behind bundles inside of bundles and mailbox commands, etc.
Okay, so I made a basic turret and attached it to the vehicle, but it’s attached to the middle of the vehicle, and I want it to be on top of the vehicle. Is there a way to adjust what part of the sprite it attaches to?
… which would actually work fine for foot soldiers carrying guns. But it doesn’t work right for turrets that are meant to be top or bottom mounted on vehicles.