Discuss Scratch

sayyoumebaka
Scratcher
22 posts

Hitbox keeps following player

I want to make it so that when a hitbox is created it stays where it is rather than sticking to the player but nothing im doing is working. Can anyone explain why?

https://scratch.mit.edu/projects/1326027608/editor

The block responsible for the player following is Filter Attacks.
NMario84
Scratcher
1000+ posts

Hitbox keeps following player

Wait….. don't you generally want a hitbox for your character?

Or is this hitbox for a different object? If it's for an entirely new sprite asset, then you could just make the hitbox as a new sprite with 0 code, and that goes without saying it won't follow the player.
sayyoumebaka
Scratcher
22 posts

Hitbox keeps following player

NMario84 wrote:

Wait….. don't you generally want a hitbox for your character?

Or is this hitbox for a different object? If it's for an entirely new sprite asset, then you could just make the hitbox as a new sprite with 0 code, and that goes without saying it won't follow the player.

I was referring to attack hitboxes
NMario84
Scratcher
1000+ posts

Hitbox keeps following player

Ah okay….. Well, i suppose since your regular hitbox supposedly checks walls and ground, have another set of hitboxes for attacks as a different color from your base hitbox. You still want to have the attack hitboxes following/binding to the said player/character.

I was going to suggest same hitbox sprite have different colored htiboxes one for base, and the other color for attacks, but that might just complicate things more. So I guess it's best to use separate sprites for this scenario. Though you could also do it in different clone spawns of the same character too..

Powered by DjangoBB