ramones's Forum Posts

  • What about max fall speed?

  • You haven't changed the max speed from 330 so it won't go any faster than that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The query string format for GET/POST requests is key-value pairs like key=value, separated by &, with + replacing any spaces.

    parameter1=value1&parameter2=value2&parameter3=value+number+3

    It looks like you were trying to use jQuery syntax. In jQuery you can pass an object { parameter1: value1, parameter2: value2 } which jQuery will convert into a query string like above.

    And then the base64 encoded image could contain & or + or other characters that could be confused as part of the query string so you need to wrap it in URLEncode().

  • Set the POST data to:

    "type='base64'&image=" & URLEncode(RegexReplace(CanvasSnapshot, "data:image/png;base64,", "", ""))[/code:1wem2q5u]
  • Use Mouse.X(0), Mouse.Y(0) to get the mouse position on layer 0.

    Or Mouse.X("layername"), Mouse.Y("layername").

  • That looks great. Nice examples!

  • You only have star collision conditions for when Up <= 0 or Up > 1. What about when Up == 1?

    In other words, if you miss one mushroom then Up will equal 1 and colliding with the star won't do anything.

  • Yes, sounds like a good idea. Maybe in combination with the current method. If the cell is blocked, choose the nearest empty cell (because that would be much faster in many scenarios). If A* can't reach that one then get the nearest reachable cell (cell with the lowest H value from the closed list?).

  • [quote:3qld29iy]I bet if you took away the purple squares and just told it to find a path to the nearest green, it would be trying to move to a square on the inside.

    Yeah that would work as well, but then I could also just remove all the solids and then it would be able to find a path to the blue square. I don't say that to provoke you , but merely point out the initial problem.

    I wasn't offering that as a solution. Just a test you could do to see where it's trying to find a path to. If it's trying to get to the inside then that would explain why it won't move when the wall is there.

    [quote:3qld29iy]

    1. The path calculated shouldnt place the nearest empty cell the furthest away from the unit using the pathfinding behavior. Based on the A* algorithm it seems to be wrong, as the cost to move there would be higher than the tile nearest to the unit with pathfinding behavior. And the fact that the pathfinding unit cant even reach that tile, so makes little sense why it then marks this as being the cell to go to.

    It chooses the empty cell closest to the destination. It's not going to use A* to find which empty cell is closest to the player because then it would have to pathfind to every cell on the map and that would take forever. And even that would be no use because the cell right next to the player would be the nearest.

  • If you tell it to go to a green square, it can't because they are solid. So it looks for an empty square beside the green square. Now that empty square might be inside the box or it might be outside. In your first screenshot it's probably inside so there's no way to get to it.

    I bet if you took away the purple squares and just told it to find a path to the nearest green, it would be trying to move to a square on the inside.

    [attachment=1:34y6gp0c][/attachment:34y6gp0c]

    [attachment=0:34y6gp0c][/attachment:34y6gp0c]

  • That should still work. Units.UID will give you the object's UID. There's no "family UID".

  • No, you have to use a loop.

  • There's also int("string") and float("string").

  • You can have the condition "Bulbasaur: Pick instance with UID Pokemon.UID" which is kind of like saying "if this Pokemon is a Bulbasaur".

  • Set the angle to 180.