99Instances2Go's Recent Forum Activity

  • Keeps getting hung up.

    You have NO code that makes the 'while' untrue.

    In general a 'while' is safe to use like this....

    Local Variable 'check' = 0

    Condition to check

    Action Set check to 1

    While

    check = 1

    ...Empty condition

    ...Action Make a change

    ...Condition to check

    ...Action set check to zero

    Or

    Local Variable 'check'. = 0

    If overlapping

    set check to 1

    While check = 1

    ...sub

    ...Action move the object

    ...Is NOT overlapping

    ...set check to 0

  • You do not have permission to view this post

  • First you need logic. Then apply the logic.

    From side 2 side, i suppose there are platforms between the sides.

    Set the controls in the platform properties to custom. Now we have to code every move it will make.

    • When there are no decisions to make at its current position.

    Just keep going in the current direction.

    To do that you need a instance variable that holds the direction.

    Use the action 'Simulate control' to simulate left/right according the instance variable.

    -When there is a wall in the left or the right.

    Platform has a condition 'Is by wall'. Change the instance variable to reflect the change in direction.

    -When it comes to a place where it has to decide to jump on or walk under a platform.

    Place invisible object on those places where a decision is needed. Detect an overlap.

    Pick a random (expression choose(0,1)). If 0 jump

    -When it comes to a place where has to decide to just fall off or to jump to another platform.

    Same system, place invisible objects. Detect an overlap.

    Pick a random (expression choose(0,1)). If 0 jump

    And so on. Build the logic. Apply the logic.

    -When it is seeing the player

    To look for the player you can use the Line-of-sight behavior.

    Calculate (based on x differences) what direction the player is.

    Change the direction instance variable according.

    Eventual look if the player is jumping, if jumping run other direction.

    And so.....

  • moonshade10

    Try the Line-of-sight behavior. With a small cone. Dont forget to place the spikes with theire angle down.

  • You can use the browser plugin to log them.

    You can make them static to see them directly in the debugger, but keep in mind that they dont auto reset in that case.

  • "If player X is equal to Spike X ...

    That is virtual impossible (with the exception of exact grid movements).

    Positions have mostly a (in context to evaluating kinda randomly) fractional part.

    So, 'is equal' has no chance.

  • You cant set the mouse to a position in events.

  • Because the shortest path will always contain only 3 nodes, there is always only 1 shortest path between 2 points ....

    Here a different approach.

    This solution finds a path that contains as much nodes as possible between start and end, with a perception of the shortest path.

    https://www.dropbox.com/s/degglr7bv9w03 ... .capx?dl=0

    Its lighting fast. But can probably still be optimised more.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Mirlas, this is not a solution, just an illustration. The loop simulates a very very slow device. 7 fps on my machine.

    Dont do this, okay ? It might help you to see the link between things.

    https://www.dropbox.com/s/y3atcsbxfyvzu ... .capx?dl=0

  • If the rest is perfectly fine, then this is not gonna help at all.

    https://www.dropbox.com/s/an3nxygcorchd ... .capx?dl=0

  • You evaluate turn = 1 ? If so, you set turn to 2, making the next condition, evaluating if turn = 2 ? true.

    Use 'else'.

    if 1 ?

    else

    if 2 ?

    else

    if 3 ?

    and so on.

    Besides this obvious little error, i have no idea what the gamelogic is supposed to do. Sorry.

    (link to the game: https://www.scirra.com/arcade/other-gam ... test-12492)

99Instances2Go's avatar

99Instances2Go

Member since 12 Feb, 2016

Twitter
99Instances2Go has 2 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies