Stupid Problem (Probably quick)

So my object (Shielder) attaches a shield at spawn. that works fine but the attached shield loses it’s collision, any fix to this?
(The shield works fine when not attached.)

2 Likes

Attached objects do not have collision. @JR01 explained this in greater detail in Attacher Collision and Attacher Blocks Features. (sad I know)

2 Likes

No clue what i’m gonna do then

2 Likes

Do you just need the shield to be at the same position?

2 Likes

Exactly. X and Y extract.

2 Likes

I suggest spawning the shield in front of the shielder with the ame movement code.

2 Likes

Wait but if there are multiple of this enemy, then how would that work?

2 Likes

In the enemy, extract its own X and Y, and use those coordinates for the spawn of a shield. Make a proximity in the shield for the enemy (set it to closest object), and attach that to the shield’s position.

3 Likes

Ok, so then what would happen if one enemy passed the other, would the shield just switch to that enemy?

2 Likes

That’s a good question. In order to fix this, you’d have to make a global list of both the X and Y values and then assign each shield a place on that list.
Or you could just emit the shield :upside_down_face:

2 Likes

True but then the emit, won’t follow the exact location of the enemy, if the enemy is stunned or slowed. This a hassle that could be easily fixed if messages could be sent to spawned objects.

2 Likes

Exactly, my friend :slight_smile:

2 Likes