dop2000's Forum Posts

  • Use an instance variable AngleOffset on wings. Change it with speed, say, from 0 to -45 for the left wing and from 0 to 45 for the right. On every tick set wings angle to jet.angle+self.AngleOffset

  • By default, the TileMovement behavior expects the image point to be at the top-left corner, while Pathfinding works best with the image point in the center. I believe if you set the image point to the center and set the grid offsets in the TileMovement behavior to 8px, both behaviors should work correctly.

  • That's how picking works in C3. The parent "On tween" event picks a single instance of pam_paws for the entire event.

    If you want to access other instances in the same event, you need to use "Pick all" condition - but it will only be active within its sub-event. Once the sub-event has finished, the picked scope reverts to that single instance.

    The order of conditions is also important. In this case "Pick all" needs to be first, above the "compare instance variable" condition.

  • You have thousands of objects in a family?? This doesn't seem like a good way to organize your project..

    You can easily make a list of all objects - just extract it from Families\FamilyName.json

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, "pick all fam_paws" is not redundant, it's required in this case. But I can see on your screenshot that this condition is in a separate sub-event. Combine both sub-events into one and it should fix the issue.

    Also, instead of "pick by evaluating" use "fam_paws compare instance variable", it's easier.

  • I would definitely switch to pathfinding and move to behaviors exclusively if I can somehow manage to make it work in 16 px increments, to simulate the way 8 direction movement looks.

    Did you mean TileMovement? 8direction doesn't move in increments, and it's a poor choice for a tile-based game, because you want your objects to always snap to the center of the tile.

    MoveTo can be used on a grid:

    "Move to self.x+16" will move 1 tile to the right.

    "Move to self.x+16" followed by "Move to self.y-16" with "add waypoint" option will move 1 tile right and then 1 tile up. But you will need to check for wall collisions with events.

  • Looks like you are using a bunch of different movement behaviors - pathfinding, tile movement, even 8direction? It will be difficult to make them all work correctly on a grid.

    I would keep Pathfinding and MoveTo, and get rid of the others. MoveTo is pretty versatile and works well on a grid. You can use it instead of the TileMovement, just check for collisions with events.

  • Can you post a screenshot of your code? Also, run the game in Debug Mode and check that there is an instance of fam_paws with pawState containing current (without quotation marks).

  • The easiest fix would be moving the origin point to the center for all objects.

    Alternatively, you will need to offset all path points by 16px. Say, find path to (NPC.X+16, NPC.Y+16), and when the path found - loop though all nodes and add 16px to them..

    Or use a separate invisible sprite with the origin point in the middle for pathfinding, and pin your NPCs to it.

  • Try Cell border=-1

    Here is a demo:

    dropbox.com/scl/fi/fb9xopeimo4ht4mwbzu2q/PathfindingOnTilemap.c3p

  • Yes, if you align the tilemap and configure the pathfinding grid properly. Also, disable diagonals in pathfinding, and use MoveTo behavior to move along the pathfinding path - it's more accurate.

  • "debugText Set from JSON" is incorrect! Use "debugText Set Text" action.

    After you fix that, if nothing appears in the debugText, this means the Websocket doesn't receive any text data. You can also press F12 and check for errors in the console.

  • {"is-c3-clipboard-data":true,"

    You know that we can't paste your code without adding all the same objects first? Next time please post screenshots.

    Try this:

  • I still don't understand. What should it look when it's half colored? What if it collided with 3 different colors - will there be 3 different spots, and the rest of the dog remain white? Or the entire dog becomes progressively darker with each collision?

  • Can you make a picture? What will the sprite look like after several collisions with different colors?