pumacap's Forum Posts

  • Hi igortyhon,

    I see. Thank you so much for your input.

  • Hi,

    I'm thinking about using the Local Storage plugin to save player progress in my game. I'm just wondering if the save file can be easily accessed and manipulated? And if this is the case, what would be a save game progress alternative that is more difficult to manipulate?

  • Thanks for the inputs BaconSwagg and R0J0hound, I feel I know how to handle this problem now.

  • Hi,

    I want to apply seperate actions for different intervalls of the angle between player and enemy; 4 quadrants for the total circle of 360 degrees.

    In the code I have used the condition "is between two values" for each quadrant and written "angle(Sprite1.X,Sprite1.Y,Sprite2.X,Sprite2.Y)".

    The angle values I have set to the following:

    Quadrant 1: first angle 315, second angle 45

    Quadrant 2: first angle 45, second angle 135

    Quadrant 3: first angle 135, second angle 225

    Quadrant 4: first angle 225, second angle 315

    However, this does not yield satisfying results, the desired actions will not take place when the angle between player and enemy is within these angle intervals. Maybe the first and second angles I have assigned are the wrong values?

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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?

  • 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.