I'm new around here, although I've been reading some tutorials and trying some stuff out.
I'm actually working on a game. It's an arcade game, in perspective.
Some friends are working on the artistic part of it, so I am currently working with own-made boxes.
Basically, I have an area, surrounding my player character (pinned to it), and if an enemy gets into the area, it should react by shooting at me, and moving towards me.
The problem I'm having is the following one:
When an enemy enters into my "area", ALL the enemies start to shoot me, while I only want to shoot me the one inside my "area".
How can this possibly be done?
I've settled a health counter for the enemies, which work great, and it's independant for each enemy, but I've tried adding a boolean, which settles if it's inside the area, or not, but still, while doing so, all the enemies attack me.
It's like that boolean would be linked to them all, and would switch for them all at the same time.
Also...and I'm currently working on this, how can I make the enemies to shoot at my position, instead of "straight".
Thanks a lot for the help provided,
Get the capx
Already managed to shoot at my position.
Also added a decreasing life bar, but it's anchored to the screen, and if you realise, whenever you move, it vibrates horizontally.
How could I solve this?
Also, link to playable content
I already solved enemies chasing me.
Yet, I have no clue on how to make the enemy that enters my active zone (and not them all at once) to chase and shoot me.
Any helping hand out there? :)
I guess it has to be done with UIDs, right?