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!

Answers

  • CluvCluv Member Posts: 229
    What you have is a rule that says when a certain thing happens, "fire". Because all your actors are identical, they will do the same thing at the same time. You can unlock each actor and give them a different rule for firing.

    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.
  • manoni123manoni123 Member Posts: 2
    edited October 2012
    I cant really give the actor diffrent shooting rules becouse
    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.
  • CluvCluv Member Posts: 229
    I would take a look at your constraint for shooting and make sure it is doing exactly what you say it is. It seems like what is happening is that all 4 of your actors are fulfilling your rule for shooting and that is why they are syncing up. What I do is create a display text attribute and place it inside your enemy and display this magnitude you are talking about. I got a sneaky suspicion that the number is coming up the same on all 4 for some reason.
  • manoni123manoni123 Member Posts: 2
    Well I fixed it finally ^^
    I inedeed made diffrent rules for the actor to start shooting when the enemy
    is at a certain position.

    Thank's alot Cluv.
  • CluvCluv Member Posts: 229
    Awesome! I am glad I could help.
Sign In or Register to comment.