the.sand's Recent Forum Activity

  • dop2000

    Perfect thank you so much!

  • Really appreciate that dop2000

    Where/how would I set a constant variable like that?

    I'm a little new to all this...

  • dop2000

    OMG of course...can't believe I missed that.

    Thanks for taking the time to check it out Dop.

    And thanks for the compliment! I know you've probably seen a lot of games here on this forum so that means a lot coming from you.

  • dop2000

    No problem here it is:

    Its a little bit of a mess as I am in the middle of switching from spawning a tile image to actually modifying the tilemap as I think it will be lighter on the system.

    Essentially I can know if the call wass successful if the player watering animation is triggered and the only time it works is if I use TileID:0 and not TileID:1282

    Here is a link to the file if you want to take a look: drive.google.com/file/d/1W-16XIjrOijjUH7soWGSFGXsywrzp2LG/view

    Thanks!

  • dop2000

    Thanks Dop!

    They are on separate layers but if that were an issue shouldn't the "set tile" action not work?

  • Hi all,

    My player has the ability to modify the tilemap. For example they can use the Hoe tool to change the tile from grass (TileID:0) to dirt (TileID:1282). And this works just fine, switching the tile successfully.

    Once they change grass to dirt, the next step is for them to be able to water that tile, but the watering can should only work on dirt tiles. So what I am trying to do is check that the tileID underneath my aimer (used for targeting) is equal to TileID:1282 and if so they can water the tile. For this I am trying to use the "Compare tile at" action:

    Compare tile at X: Tilemap.PositionToTileX(Aimer.X)

    Compare tile at Y: Tilemap.PositionToTileX(Aimer.Y)

    = Equal to

    Tile ID: 1282

    But this check never returns successfully, event though the tile underneath the aimer is a dirt tile (TileID:1282). What's odd is that if I set it to check for the grass tile (TileID:0), it does work. So I think that even though the tile image has been changed from grass to dirt, the tileID isn't actually being updated.

    Is that what is going on here? If so, is there any way to get the tileID to update as well as the tile image?

    Thanks in advance for your help!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi all,

    I have been spinning my wheels trying to figure out how to build an item quantity tracker into my item pickup function.

    Essentially when the player picks up an item I want a number to appear in their inventory showing how many they have.

    The issue is every time the item is picked up, the function runs and it creates a new text object on top of the other one so they just keep stacking and it gets all jumbled.

    I tried destroying them and recreating it each time the item is picked up but it destroys the other item quantities.

    Here is my current config:

    And here is a link to my project file if you require more context: drive.google.com/file/d/1XcwPibvtKqQ79krFOU7Gy_eqV_tKZ90V/view

    Thanks in advance!

  • calminthenight

    Wow that simple eh? Haha that worked!

    Thanks so much!

  • Hi calminthenight

    Here is a link to my project file: drive.google.com/file/d/1NDH_3Aqj4FgjMksGCBrROOiC1z172uAS/view

    I have the numbers in the inventory right now (press space to hide and show the inventory bar)

    Thanks for your help!

  • Hi all,

    I am trying to use this script to change a tile in my tilemap from whatever it is to tileID "123"

    const tm = runtime.objects.Tilemap.getFirstInstance();

    const player = runtime.objects.Player.getFirstInstance();

    tm.setTileAt(player.x,player.y,123)

    I thought this would be the way to script this but its not updating the tilemap.

    What am I missing here?

    Thanks in advance!

    Tagged:

  • Also my project sampling is set to "nearest" and I am not using pixel rounding. (I tried pixel rounding but it made no difference.)

  • Hi all,

    I need to use text at a small font size (8 or even smaller) and it is appearing just fine in my layout while I am working but when I run the game it blurs the text like crazy.

    Before running

    While running

    To clarify I am using a font not a sprite font. I tried a sprite font and had even more issues.

    Is there any way to prevent this from happening?

    Tagged:

the.sand's avatar

the.sand

Member since 12 Aug, 2020

None one is following the.sand yet!

Trophy Case

  • 4-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • RTFM Read the fabulous manual
  • Email Verified

Progress

7/44
How to earn trophies