pumacap's Recent Forum Activity

  • Hi lionz,

    Then you instead have the problem that the enemies stack.

    In many games multiple enemies being on the screen at the same time can find a way to the player, finding their own spot beside the player.

  • Hi lionz,

    I want each enemy to find a position directly beside the player.

    Right now when a couple of enemies have line of sight to player and pathfind to player, only some will reach a position directly beside the player, while the rest will line up behind the ones that achieved to reach the player.

  • Hi,

    How do I avoid enemies that have soldid behaviour from lining up behind each other when having multiple enemies pathfinding to player?

    I have tried to let the enemies pathfind to different invisible blocks that at all time surround the player, but this has not solved the problem.

  • Thanks badimo57_7416 and winkr7. Your inputs are much appreaciated. Now I have some approaches to play around with.

  • Hi,

    So, if an enemy pathfinds to the player so that player and enemy are beside each other, then the enemy will quickly adjust its position to the player's every new position. This means that the player cannot really dodge the enemy's attacks. Is there a way to decrease the speed of which the pathfinding enemy adjusts its position to the player's position?

  • Hi Winkr7,

    I want to do so that when the player is within a certain distance from an item on the ground, the player can pick up the item. The overlap fake sprite idea solves this problem perfectly. Thank you for your help!

  • Hi,

    I know I can use the compare two values command and write distance(Player.X,Player.Y,Sprite.X,Sprite.Y) to compare the distance between Player and Sprite. But is there a way to use compare distance for each sprite in a family without having to create a compare distance event for each one of the sprites in the family?

  • Now I understand what you meant. Yeah, I could do some sorting out and go with either only compare distance or LOS. However, what solved my problem with making the enemy reach a complete stop was to set tile movement to disabled.

  • Hi lionz,

    I went with the approach of using both pathfinding and line of sight because I am using pathfinding to simulate 4 direction only tile movement. Maybe this 4 direction simulation could have been done with line of sight?

    But, regardless if I use both pathfinding and line of sight or not, I feel there should be a way to make the enemy reach a complete stop when the distance between player and enemey for pathfinding/line of sight is exceeded?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    I have an enemy that pathfinds to player if player is within a certain distance of the enemy, and the enemy also has the line of sight behavior to allow for it to aim towards the player to throw missiles.

    Right now when the distance between player and enemy for which pathfinding and line of sight applies is exceeded, the enemy starts to walk back and forth between two grid points and the animation is also playing.

    I have tried to solve the problen by saying that if the maximum distance for triggering pathfinding is exceeded as well as the line of sight is lost, stop animation and stop pathfinding. However, with this event implemented the enemy still behaves as described above.

    What other approach could I take to solve this problem?

  • Hi lionz,

    Yes, when clicking on an enemy I want it to be targeted until I click on another enemy and instead want that one to be the only enemy targeted. Anyway, problem has been solved already.

  • Hi,

    I want to do so that the player can only do damage to one enemy at a time. In order to take attack on an enemy I want the player to mouse left click on the enemy.

    I have accomplished that when the player mouse left click on an enemy the enemy will be targeted and take damage from the player, but right now it is possible for the player to just continue mouse left clicking on more enemies and these enemies will simultaneously also take damage from the player.

    Simply put, how could I limit attack to one enemy at a time?

pumacap's avatar

pumacap

Member since 13 Feb, 2024

None one is following pumacap yet!

Trophy Case

  • RTFM Read the fabulous manual
  • Email Verified

Progress

2/44
How to earn trophies