[BEHAVIOR] EasyStar.js pathfinding for tilemap

2 favourites
From the Asset Store
This is a black tileset with 2 tilemaps, props, one animated character and more.
  • dop2000 : it is.

  • Adavo It works fine for me with the latest C3 build.

    Is it any specific action/event of the behavior which throws this error?

  • dop2000 : I use the R260 stable.

    Here is the only place where I use the plugin.

    Here is the behavior settings

    I don't know what I can add more to help make it works. Oh yes, maybe something that I didn't try : is it necessary that the scientist in my case need to be on the same layer as the tilemap ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah, you need to add this behavior to Tilemap object, not to sprites.

  • Ah, you need to add this behavior to Tilemap object, not to sprites.

    Ha ha . Indeed it works now :-).

    It seems that now I have a path, I need a "rex" addon "moveto" in order to indicate to the scientist to move to this place ?

    Does a tutorial exists on this addon ? :-S

    Thanks for your help

  • In C3 you don't need Rex's addons, just use the official MoveTo or TileMovement behaviors.

  • dop2000 : I finally made it. It was somehow painful because I made a decision early in my game that I am paying it right now. The issue that I had is that my tilemap was a 20x20 grid size, where my sprite (scientist/player) where a 40x40. As a consequence, and since the pathfinding works using tilemap size (20x20), it purpose me path that I couldn't move to because of the different size.

    Moving my tilemap to 40x40 (which implies to REDO EVERYTHING regarding tiles graphics and map construction) finally works. Than damned painful but... "will remember this" ;-)

    twitter.com/GamesOanaa/status/1441872831336222721

  • Could anyone please make an example of the C3 version working using Tile Movement?

    I'm not sure I'm doing things right, for example these events doesn't seem to work..

  • Could anyone please make an example of the C3 version working using Tile Movement?

    I'm not sure I'm doing things right, for example these events doesn't seem to work..

    Can you give a reason? They are two fundamentally different methods, and the use case is pretty limited.

  • This is the quick and dirty method.

    dropbox.com/s/apv49zqadv9rotn/easystartilemove.c3p

    The event with the variable comparison is a bit precarious as the order can matter in some cases, and the use of the inverted "is moving" doesn't seem like the best possible trigger.

    Note you still need an extra collision(solid) object for the Tile Movement behavior.

    The behavior could use some things to make it more compatible.

    Like the ability to set a tile position as an obstacle, and obviously on stopped moving.

  • Thanks Newt, this makes things clearer. I don't have a use case yet, but I was really curious to see how it would work, since I'm currently working on a project that uses Tile Movement heavily.

  • I think MoveTo behavior in C3 is the best choice to use with EasyStarJS. You can feed it all node coordinates as waypoints and the object will move from start to finish with nice acceleration/deceleration and rotation.

  • Here's a simple MoveTo example I did a while back, as dop2000 says, it works well with EasyStar.

    sendgb.com/C4PmwuZUbv7

  • Thanks for the example Mikal, this helps a lot. Apparently the Behavior with Move To works better than using Tile Movement.

  • Hello,

    Sorry if it was already asked, but how using multiple tilesets?

    For exemple, having walkable tiles on a Layer, and Collision in another, how do we use Find path that way? Is it possible?

    Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)