Discuss Scratch

Kress404
New Scratcher
7 posts

How to attach a sprite on a specific part of another sprite

I'am making a tank game. The tank can move in all directions and also has a rotating turret. I want a sprite that will always be at the tip of the barrel.

This will be a nightmare to code probably.

Thanks for help! (in advance)

https://imgur.com/p02bwex <- Image
Jlerpy
Scratcher
1000+ posts

How to attach a sprite on a specific part of another sprite

You can give that sprite a forever loop that tells it to go to the turret, point in the direction the turret's facing, then move forward x steps so it's sitting at the end of the barrel.
Kress404
New Scratcher
7 posts

How to attach a sprite on a specific part of another sprite

Jlerpy wrote:

You can give that sprite a forever loop that tells it to go to the turret, point in the direction the turret's facing, then move forward x steps so it's sitting at the end of the barrel.
Thank you, I will try that. Sorry for answering sooo late.
Kress404
New Scratcher
7 posts

How to attach a sprite on a specific part of another sprite

Jlerpy wrote:

You can give that sprite a forever loop that tells it to go to the turret, point in the direction the turret's facing, then move forward x steps so it's sitting at the end of the barrel.
It works really well! Thank you!
Jlerpy
Scratcher
1000+ posts

How to attach a sprite on a specific part of another sprite

Happy to help.
ronaldo__vs__messi
Scratcher
1 post

How to attach a sprite on a specific part of another sprite

it wont work for me
Vixi_Mation
Scratcher
78 posts

How to attach a sprite on a specific part of another sprite

ronaldo__vs__messi wrote:

it wont work for me
if you give more details maybe I can help you
Jlerpy
Scratcher
1000+ posts

How to attach a sprite on a specific part of another sprite

ronaldo__vs__messi wrote:

it wont work for me

Why not? What's going wrong?
deck26
Scratcher
1000+ posts

How to attach a sprite on a specific part of another sprite

ronaldo__vs__messi wrote:

it wont work for me
You'd be better creating your own new topic rather than necroposting. Many people will see the date of the original post and ignore the topic or not read as far as your question. A new topic is always better even if the topic is current - you don't want to confuse the answers for the original poster.

Powered by DjangoBB