I don't know the best approach to this, but I want to create an enemy with blades spinning all around it. That way the enemy can chop the player to pieces, and the player can defeat it using a ranged attack. I have two actors for the enemy. The first one is the main guy that moves around and takes damage. The second actor, is a bunch of blades spinning around the guy. Basically, I have the second actor follow the first one by setting it to the same position as the first one. It works fine , but when I place more than one enemy in the scene, the second actor only follows one of the guys. I understand why, it's because it's applying to every actor of type.
Does anyone know a better approach?
This is what I used on my behavior I created (pseudo code):
When Created
{
create(Blades) at (x of self, y of self) at (front);
}
Always
{
for each(actor of type:Blades)
{
set x to x of self for actor type;
set y to y of self for actor type;
}
}