How do i "attach" sprites to other sprites? (Desc for extra info)

I know you can set sprite A position to sprite B x and y, but i want different collisions in a sprite that are toggleable, as im making a platformer with the T tetromino. I dont know how to explain this well but ill try giving more info if needed. (Using block code)

2 Likes

So you want to attach a sprite to a sprite and be able to toggle which sprite can collide with objects in the simulator?

1 Like

im pretty sure the blue guy with the hair already made an extension for that

1 Like

Pretty much yeah

Could you send a link to the extension?

This is the game rn if that helps, i would use a single sprite and change image but that makes extra collisions that i dont want

You could do one of the two solutions:

1 following a sprite: using the sprite utils get the distance between 2 sprites. If its to far make the sprite get the following block to whoever it is attached to. If its close enough make it stop moving with the if else set my sprite to follow with speed of zero.

If you want to connect to sprites,

  1. On game update
  2. set sprite x to my sprite x
  3. set sprite y to my sprite y

if you want to change its position you could say:

set sprite y to my sprite y+10

1 Like

dont remember it

Wait its the one made by Sonicblastion called smth like sprite collisions

1 Like