Cosmic Lotus's Recent Forum Activity

  • Thanks man, i think you definitely have the right idea, ill give it a try :)

  • Hey Guys, I'm trying to set up a background effect with a tilemap but i cant seem to figure it out,

    I basically just want that when the mouse hovers over the tiles, the tiles would change to the second tile, then when the mouse is not over them, there will be a short delay before they change back to the first tile.

    the way i set it up is almost right except the tiles change back all at the same time instead of one at a time.

    any advice would really be appreciated, i've been trying to figure it out for a while.

    Here is my current code:

    // Spawn Initial Tiles

    + System: On start of layout

    -> System: Set layout scale to 2

    ----+ System: For "X" from 0 to 216

    --------+ System: For "Y" from 0 to 192

    ---------> Tilemap: Set tile (LoopIndex("X"), LoopIndex("Y")) to tile floor(random(2))-1 (normal)

    // Cell State Management

    + Mouse: On movement

    -> (no actions)

    + Tilemap: Tile (Tilemap.PositionToTileX(Mouse.X), Tilemap.PositionToTileY(Mouse.Y)) = 0

    -> Tilemap: Set tiles at (Tilemap.PositionToTileX(Mouse.X), Tilemap.PositionToTileY(Mouse.Y)) with area 1 x 1 to tile 1 (normal)

    // Revert Tiles Back to 0

    + System: Every 0.55 seconds

    ----+ System: For "X" from 0 to 216

    --------+ System: For "Y" from 0 to 192

    --------+ Tilemap: Tile (LoopIndex("X"), LoopIndex("Y")) ≥ 1

    ---------> Tilemap: Set tiles at (LoopIndex("X"), LoopIndex("Y")) with area 1 x 1 to tile 0 (normal)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi I'm busy creating an Asset library, where I've bundled a lot of cc0 assets & Audio into 1 project, I've set up collisions & animations & some basic behaviors etc. would it be legal to sell this asset bundle on the asset store?

    Tagged:

  • I managed to get it to work by doing this:

    | Global number MouseY‎ = 0

    | Global number MouseX‎ = 0

    | Global number TileY‎ = 0

    | Global number TileX‎ = 0

    + System: Every tick

    -> System: Set MouseX to Mouse.X

    -> System: Set MouseY to Mouse.Y

    -> System: Set TileX to Tilemap.PositionToTileX(MouseX)

    -> System: Set TileY to Tilemap.PositionToTileX(MouseY)

    -> Text: Set text to "TileX" & TileX & " TileY" & TileY

    + Mouse: On Left button Clicked on Tilemap

    -> Tilemap: Set tile (TileX, TileY) to tile 2 (normal)

  • What about if i need to change a tile when you click it, into a different tile? how do i pick that specific tile which i clicked?

  • Yay! it worked, thank you :D

  • Heres what im trying to do: i have a tilemap with 3 tiles (0,1,2), i would like to spawn these on the start of the layout in a 10x10 grid but i want each tile in the grid to be randomized between the 3 tiles.

    I tried this which didn't work:

    + System: On start of layout

    -> Tilemap: Set tiles at (0, 0) with area 10 x 10 to tile floor(random(3)) (normal)

    this just spawns the 3rd tile all over the grid, any suggestions on how to do this?

Cosmic Lotus's avatar

Cosmic Lotus

Member since 7 Jan, 2020

None one is following Cosmic Lotus yet!

Trophy Case

  • 4-Year Club
  • Entrepreneur Sold something in the asset store
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

8/44
How to earn trophies