How do I make NPCs to fight among family members.

0 favourites
  • 7 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • "Enemy" is a family, on collision with "shoot". I have to pick "Enemy" which UID is "shoot.owneruid", set it as target and hunt him down. Done like that. Not working.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Let me extend this problem. The player is firing some shoots here and there. Enemies that got hit start to hunt him down and occasionally fire against each other getting in another fight between family members... so... how do i do?

  • Occasionaly.. When is that?

    You have to provide all the conditions for the computer to know when to do what..

    I'm guessing You have no issue getting an enemy to hunt the player when he is shot, because that seems pretty straight-forward..

    What conditions should be true for that enemy to start shooting at other enemies?

  • what about using line of sight of other enemies pull their variable, UID and do a Choose set number string based on the line of sight pulled in. and have that to target the enemy?

    I look at it like this If I am angry then the first person or enemy in my view (line of sight) gets shot or I "Choose" that kid over there and then start blasting. And you can event place your own variable for the player in that choose number string.

  • I am so happy for your ongoing effort answering my problems. Thank you Gearworkdragon and LittleStain

    This is how i make them hunt me:

    Ignore any variable non-related on any condition presented. Although they are in Portuguese you can understand it easily

    Now, the problem really is as they are fighting the player and shooting him, some bullets may hit on people from the same family but from a different faction and that will change the target priority for them. I am about to implement codes for every faction on the game, but it would be really helpful and code efficient if i could do it all one time using families.

    Already created enemy2 family with the same sprites and tried it as targets not happening...

    Ps.: (rotation toward is simple and done in another section)

  • could we see the name of the family ? Its hard to tell which family doing what.

  • Everything Faccoes

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)