LittleStain's Recent Forum Activity

  • Just from my head, so there could be some unclear stuff:

    Add a global variable TotalScore

    On start of layout 1

    if local key "Total" exists set Totalscore to int(Total)

    if local key "cash" exists add int(cash) to total score

    • set text to total score

    if local key cash does not exist

    • set text to no score

    on going to next layout save totalscore to webstorage local key "Total"

    Remember to reset global variable currentscore to 0 if you want to start over on the next layout..

  • This also depends a lot on the freedom of movement of your enemies, If they are restricted to a motion on one axis, you could change there movement speed on overlap at offset for a few moments and then return them to their normal speed..

    This will offcourse only work if the enemies are moving in the same direction..

    If they are still overlapping after a certain amount of time you could choose to change the direction anyway..

    Easiest way to achieve any of this is to have a family with just the one enemy and check the families overlap with the enemy, I thought that way you can actually reference both instances..

    For families you need the paid version though..

  • you probably want to know if the player's moving angle is between certain agles to switch animations, so this is how:

    first set rotate off in the pathfinding properties.

    (YourSpriteName) pathfinding is moving along path

    System is between: (YourSpriteName).pathfinding.movingangle -between- 22.5 -And- 67.5

    • set animation to down-right

    (YourSpriteName) pathfinding is moving along path

    System is between: (YourSpriteName).pathfinding.movingangle -between- 67.5 -And- 112.5

    • set animation to down

    etcetera..

  • for each enemy

    system compare two values: distance(enemy.x,enemy.y,player.x,player.y) => 100

    enemy - move towards player.x,player.y

    for the second part I would have a rotating sprite at the players position and pin the enemy to it (trigger once), when distance is less then 100, but there are probably better solutions..

  • You can get the moving-angle of your sprite with the expression

    Sprite.Pathfinding.MovingAngle

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • which method (behaviour) are you using for the movement?

  • As far as I know, to prevent weird and unexpected effects it's still:

    "Never use physics in combination with other behaviours"

  • Are you by any change having the map be created every tick instead of once?

  • test if any enemies are left on screen using the .count

    system compare two values: familyenemies.count=0

    but you should only do this in level two, only trigger it once and only have it active after enemies have been created..

    so please let the program know on what level it is by using a global variable level and please put all the events for level 1, level 2 etcetara in their own group and only activate it when that level is playing..

  • you have an event levelonenemy destroyed for level 1 that's why it's working..

    for your level 2 enemies you still have the enemy2health<0 event, which isn't working..

  • You have an action that sets the hand towards touch.x, touch.y every tick,

    so whenever you touch the screen the hand wil be pointed there.. (So also when you touch the buttons on the bottom)

    Whenever you are not touching the screen it will point at the upper left corner or when mirrored to the position the upper left corner is mirrored, for no touch means touch.x and touch.y are both 0..

    You are going to have to work with touch ID to enable multitouch and add an event for the hand to point forward when not touching..

    Also you should add conditions so when touching the buttons the hand will not be pointing towards them..

  • If you'd rather still see them, just right click and set them disabled..

    but yes like I showed in my first picture.. delete all that is crossed out in red.. (Thought that was obvious)

LittleStain's avatar

LittleStain

Member since 26 Apr, 2011

Twitter
LittleStain has 4 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies