Zebbi's Recent Forum Activity

  • Whats the point of c3?

    Trying to stay in business seems to be about the top and tail of it, from what I can tell.

  • TileAt(loopindex("x"),loopindex("y"))

    Sorry, got it myself in the end!

  • EDIT: This works!

    Thank you R0J0hound! Hopefully that looks okay?

  • R0J0hound trying to work out what &tile& should be?

  • You should be able to do it by changing the logic around. In it able to open the capx right now so this may be a bit different. You don't even need a variable. You could take a loop over all the tiles and make these sub-events to keep for example tiles 4 and 6.

    Tile=4

    Else

    Tile=6

    Else

    --- erase

    Or if you still wish to use a variable just structure the text variable used for the list like this. Comma seperated and starting and ending with a comma.

    Global text keep=",4,6,"

    Then use a sub-event like this:

    System compare: find(keep, ","&tile&",") = -1

    --- erase

    Thanks! Here's a screencap of what I have so far, it WORKS, it's just going to be inefficient when I fill up those tiles:

    I'll try and use your suggestion, I'm not sure if the screengrab is of any use to you. I have three tilemaps, one for display, one for solids and one for jump-thrus.

  • Changed the title to be more descriptive.

  • Is the capx actually buggered? I had a corruption a couple of years ago, and sometimes you can hack the file back to life, I believe.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yep, nice catch A local variable get reseted to its default value every tick. Making it static will make it work as if the variable was global, but retain its local scope.

    Also, Zebbi, keep in mind this system is not framerate independent, I believed you should use wallclocktime instead of tickcount to increment animTick.

    EDIT: Changed to global and it works! It was just the viewport layer was set wrong, I ALWAYS make this mistake!

    Out curiosity, can you switch out tickcount for wallclocktime in just one expression? I believe I already have a variable for changing wallclocktimeold to wallclocktimecurrent if there's a difference, but doing it in one line would be much handier.

  • I realised the Tilemap just needs two things

    • Select from dropdown all tiles (besides excepion tiles) behaviour from limited list, ie: solid, jump-thru, none
    • per-tile exception behaviour from same list (solid, jump-thru, none)

    Thus solving the problem of people applying any old behaviour to a tile, and not needing three tilemaps or more for different tile states.

    BONUS suggestion: built-in animated tiles, per-tile, define the range of consecutive tiles as frames and speed.

  • Is there a way of clearing ALL of the tiles from a tilemap, except for specific tiles listed in a variable? I'm using R0J0hound 's example: https://dl.dropboxusercontent.com/u/542 ... lemap.capx but in my situation, it would be much more efficient to clear all of the tiles, besides the few I need, rather than clear a selected few. I thought I'd start a new thread as the last tilemap thread got a bit away from the original point.

  • If everything is like in my capx, I don't see why it wouldn't work. However, without your capx it's hard to really see what's going on.

    I'll post it when I get home from work, it was exactly the same, I just have more tiles. It looks like I changed the math to suit, but nothing moves.

    Make animTick static.

    Static, you say?

  • You do not have permission to view this post

Zebbi's avatar

Zebbi

Member since 20 Jan, 2014

None one is following Zebbi yet!

Connect with Zebbi

Trophy Case

  • 10-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

12/44
How to earn trophies