How to spawn 4 copies of Enemy Object and do actions at different times

0 favourites
  • 8 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I've been searching for a solution, but have come to no avail.

    I have an Enemy (Boss_Enemy) that spawns 4 other clone enemies (4 henchmen) in 4 dedicated locations on the screen. This part is working fine.

    I have the Henchmen set to do one attack and then a 2nd attack. However; I have one of them completing the task while the others remain in the state of limbo.

    I'm looking for a capx for each enemy to take turns doing the first attack (throwing a projectile at the Player's position) and then take turns doing their second attack (leap down at the player as their designated spots are located above Player).

    I also have to figure out how to get the projectile to find the angle of the Player.

    Any capx that people know of or how to solve this problem?

    Thanks

  • First, I want to link you to this:

    construct.net/en/forum/construct-3/how-do-i-8/best-help-tips-forum-139528

    As stated in that post, the best way to get help in these forums is, explain the problem you are having and (here's the big part you're missing) what you have tried to get it to work. Then, post your project (or a stripped down example project) so we can see what you are doing and help you work through the issue. Doing this will both help you become more proficient with the tool and help us help you.

    That being said, I did throw something together for you to take a look at. Hopefully it gets you what you need. Good luck with your project.

    drive.google.com/file/d/1nMa75LaKLJAugdEEFziz3Hy_sXcT9CZy/view

  • Well looks like InDWrekt beat me to it but here's another quick example of what you are looking for :)

    onedrive.live.com/redir

  • calminthenight Good example my friend. It's always nice to see how other designers accomplish the same goal.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • InDWrekt and calminthenight

    Thank you for the suggestions and taking the time to creating a capx and posting it. I will use the "Function" button within my events.

  • calminthenight

    One added question: Is there a way to slow down the henchmen during the Attack 2 Function when they go towards the Player's position?

    I would like for the person playing have enough time to react by pressing the attack button to time their attack before the henchmen actually hit the player. This is how I intend to destroy each henchmen. The speed of them "retreating" can remain fast, just when they do the initial dive attack needs to be slow enough to give the player a chance to time hit.

    Thanks again.

  • Change the 3rd figure in the lerp expression to adjust the speed, has to be between 0 and 1. Do this only for the attacking event not the retreating event. Keep in mind that depending on how slow you go, you might need to add more time to the henchman attack timer unless you want more than one attacking.

  • calminthenightThank you! Changed the 0.2 to 0.05 and they attack at a much slower rate.

    Tomorrow, I'm going to try and pull off the timing of the attack to destroy them.

    Thanks again!

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