Problem with actors reponding together...?
I have a few actors of the same actor spawned in the map...
My issue is, when that "actor1" spots the enemy it shoots, but the problem is that all of the actors
that are spawned are shooting as well.... ( not really wheat i need)
how do i make it so only the actor(s) that are in the same specific line (x cordinate for example) as the enemy will shoot? considering I have more of the same spawned actors i diffrent areas (not in the same line as enemy
Thank's advaced!
My issue is, when that "actor1" spots the enemy it shoots, but the problem is that all of the actors
that are spawned are shooting as well.... ( not really wheat i need)
how do i make it so only the actor(s) that are in the same specific line (x cordinate for example) as the enemy will shoot? considering I have more of the same spawned actors i diffrent areas (not in the same line as enemy
Thank's advaced!
Answers
I am a bit confused by what you mean by a line? Meaning that if the actor is above or underneath your other actor, then fire? You can constrain the x position of your main actor to a global variable. Then, you can test this variable against the x.position of your shooting actor.
I always use the same one (for this example anywayz)
Here's a video of the problem i got.
I'm using magnnitude to constantly define the distance between the shooting actor the
enemy. and when enemy's X position is lower then distance the actor starts shooting.
as you can see the actor stops shooting when there's no enemy to spot.
I'm still not sure on how to make it soo that each actor that i placed will act individually when spotting an enemy.
I inedeed made diffrent rules for the actor to start shooting when the enemy
is at a certain position.
Thank's alot Cluv.