codyto1999's Forum Posts

  • 12 posts
  • Hello!

    I am attempting to do some 3D stuff. I am using the Vehicle Switching Template and so far have made it first person. Now I am trying to get the 3D camera to rotate properly where ever the character direction is looking instead of in forward position.

    I have added the project.

    I have watched a few things regarding the 3D camera rotation but seems to involve using the simulate car which I don't want to use for the character. Any help is appreciated!

    Thanks!

    dropbox.com/s/840do6vs3ft0fkn/FirstPersonTemplate.c3p

  • Hello!

    I was wondering what the best approach is to have a foreground as well as background on an object?

    I have the below object. The top of the roof should be above the character while the bottom (door) should be behind. I'm thinking maybe have the top portion as a separate object then put both sections in a wrapped container with the top being on a higher layer? I haven't tried the way I explained yet but was just wondering if there is a more efficient way?

    Thanks!

  • Hello! so I have the following image:

    I was able to get my Y Spacing to adjust as you can see but every time I try to do the x it always has the white offset.

    Thank you!

    Tagged:

  • Upon clicking a position in the tilemap, you can check if the mouse is over a tomato.

    Thanks as always, haha! I actually tried that but realize now that I need to adjust the collider. If I click within the tile it places the object multiple times but if I click on the object itself, it doesn't.

  • I am trying to avoid multiple objects layering on top of each other. In this case, I have conditions that check for left button click, that a certain tile is in the ground tilemap, and if there is no object "Tomato" within the same snapx/y spot. However it still seems to be overlapping in the same position. Any ideas?

    Thanks!

  • Setting the origin image point correctly should definitely fix this.

    Yup, eventually got it! Take a little bit of manual work but works perfect now :) . Thanks!

  • Hello!

    First of all, there might be an easier way then what I did. I have multiple frames all in 1 image. I would copy the next image/frame into a new animation frame. Then I cropped all the transparent edges from each frame (which might be the cause for the below issue?)

    The animation is below and notice how the bottom of the tree moves in some frames? That shouldn't happen. I tried centering by applying the same canvas size, align to the center, and setting the same image point for all and still seems to be a little off.

    Animation: gyazo.com/6b7ecb5de6a5a13424d084da5187ebd5

    Is there a easy way to adjust this?

    Thank you!

  • I have found the issue :)

    simply change the "tileTopositionX" and "tileTopositionY" to instead:

    "PositionToTileX" and "PositionToTileY"

    The number you get from that can be used to check if a tile is dirt for example. In your case just compare that value and check if it equals 36, as that is the tile index for dirt in your tilemap.

    Perfect! I did have that originally but I don't think I was using the mouse.x and mouse.y. Thank you so much!

  • Im not sure what could be causing this issue. If you can attach your project or a screenshot of your events that may help figure out what happened.

    Sure! Here is a the project: dropbox.com/s/pjvdjugdml69wqt/farm.c3p

    Don't mind the mess, haha! Just testing. Under the "Crop Progression" is where I'm trying this. Once I am able to properly get the result I am looking for I would compare it to the specific tile in the tile image and only able to plant the tomato sprite in the dirt if its true.

    Thank you again for the assistance!!

  • I did see that in the documentation. I think I'm just a little confused haha.

    This is what I'm clicking on in the tile map with result in top left:

    gyazo.com/84661a73b6fa509e48305bb3f720cd19

    I thought maybe it was because I have a HUD layer in front of the ground so it was selecting that. I tried moving the tilemap to the front layer and still get -1.

    So is x/y supposed to be the specified coord of the Tile set/image or the coord of the mouse click? I had tried specifying x/y as 2/1 for the tile image as well as tried mouse.x/mouse.y and still got the same result.

    Thank you all for the assistance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • TileAt(PositionToTileX(x), PositionToTileY(y))

    where x and y are layout coordinates

    Thank you for the response! Hmm,I tried that and get an output of -1.

  • Hello!

    Trying to learn all of the capabilities with construct. I found a couple resources but they didn't seem to be working so here I am :)

    I placed specific tiles on a tile map, now when I left click my mouse on a tile, I want it to compare it with a tile that I specified in the tile image/set such as 22, or 3,1 (which ever way it needs to be). I have tried all the positiontotile, tiletoposition, and tileat expressions/conversions but none seem to be passing what I am looking for.

    Thank you for any info!

  • 12 posts