BaconSwagg's Forum Posts

  • You could compare the angle of the sprite. If it's between 0 and 180, set it not mirrored, and if it's between 180 and 360, set it to mirrored. :)

  • Pick whatever shape you want (in my example I'm using a circle)

    Create a sprite that has whatever shape cutout you want in it and cut it in half.

    Then make sure the image point is set to the right.

    Next edit the collision polygon to make it match your shape. (I used a lot of points, but you can probably get away with a lot less, especially if your shape has only straight lines)

    Now in the layout place 2 copies of the sprite. Set the angle of the one on the right to 180.

    From here it's as simple as giving the sprite the physics behavior and putting whatever physics object you want into it. :)

  • You can use "Set Flipped" in the sprite actions to flip the sprite vertically.

  • It's nice to see you got it working! Good luck on making your game! :)

  • Does the ground claiming system you describe work like this?

    Green is claimed, blue is available to claim, and red is unclaimable/unreachable.

    Spots become available if they are adjacent to claimed ground.

    If this is the case, then I think this could be a possible solution:

    Keep a list of the X/Y positions of claimed ground. (so you don't have to check the entire map)

    Also keep a list of the X/Y positions of ground that is ready to claim.

    Upon updating your map, run the list of claimed ground points through a function that takes them as parameters.

    This function will check the neighboring tiles to the claimed ground. (x-1, x+1, y-1, y+1)

    If the tile being checked is already claimed then do nothing, but if its unclaimed, change it to be available.

    Store the X/Y of the available tile in the second list and use that for referencing where the tiles are. (you can also use this to pick the closest point to the Imps)

    Lastly go through both lists and check if any points are in both of them. If there is a match, then remove the point from the available to claim list. (so that ground that is already claimed isn't mistaken for available to claim ground)

    (you could also probably do some optimization to remove points from the list that have all 4 neighbors already claimed so you aren't checking them multiple times)

  • What kind of game are you working on?

  • Im not entirely sure what you are trying to do but I will do my best to help.

    PositionToTileX(X) Converts an X coordinate in the layout to the nearest X coordinate on the tilemap. (same with PositionToTileY(Y) just with the Y coordinate)

    With Pathfinding you can also just pathfind to a position rather than a sprite. To get this position you can use TileToPosition(x). (again same with TileToPosition(Y) just with the Y coordinate)

    Can you elaborate a bit on what you are trying to achieve?

  • Sure! It's actually really simple. Just use the tilemap expressions "PositionToTileX(Mouse.X)" and "PositionToTileY(Mouse.Y)".

  • I don't know if this is the best solution, but you could store the state of each task in its own global boolean variable. False for incomplete and True for complete. I think this could also probably be done with a dictionary as well.

  • If you are wanting to use a tile set for your game, then a tilemap would probably be easiest. The tiles automatically snap to set x and y positions based on the desired tile size. If you are just wanting to snap anything to a grid, then you can use a simple formula to round it.

    round(n/32)*32

    In this example n is the number you want to snap, and the grid size is 32x32, but you can obviously change that to whatever size you want it to be. :)

  • I'm not that great with art either but I'm down to help with the code!

  • You could overlay an invisible sprite on top of each of the controls. This way you will only start controlling your character when the player touches inside of the area of the sprite. :)

  • Set the face object to a sprite. Make that sprite have 2 frames (not mirrored, and mirrored). Set the animation speed to 0. Then all you have to do is whenever you want to mirror the 3d face, just switch the sprite to the second frame. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Welcome back! Firstly, yes it is possible to have different objects at different points in the x, y, and z planes. Second, the support for more complex 3d objects/models is not built in to construct 3, however it is possible with the use of plugins. :)

  • So, after some testing it has become apparent that the size of the tilemap image does NOT resize if an image larger than the initial size is loaded into it.

    Below I have the input Drawing Canvas image alongside the resulting tilemap tiles when the Drawing Canvas image is loaded in. I tested it with multiple sizes of the tilemap image, from 320x320 to 32x32.