Zebbi's Forum Posts

  • 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.

  • 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

  • R0J0hound Or better yet, can the tiles be deleted with an "all except" routine, that deletes all of the tiles, except for the ones listed in a toKeep variable?

  • Zebbi

    I haven't used the raycast plugin so I don't know if there's anything amiss. Picking the newest uid should work but I guess it depends on how you do it.

    Is it actually possible to clone all the tiles to a complete different clone tilemap, even if it set-up exactly the same way?

    EDIT: Ahh, I changed it to "set copy as Tilemap.TilesJSON" instead of "set copy as Tilemap.asJSON" and it worked! Now, how do I invert this? It would be easier, if I have, say two tiles out 300 that are solid to be picked, destroyed, and the rest left, whilst duplicating the solids on a new tilemap, wouldn't it?

  • You do not have permission to view this post

  • You can actually animate tiles themselves, but you need to get creative. Basically, you should ensure that all animated tile sprites are consecutive in the spritesheet, and then, using a for loop, you iterate through all visible tiles and normalize tile IDs that refer to animated tile to the tile ID they should actually show.

    Here's a small example.

    https://dl.dropboxusercontent.com/u/700 ... lemap.capx

    Magistross

    Just digging this old thread up, having a bit of trouble with this?

    Can't for the life of me see what's wrong with that?

  • "Shoot" =? left(Sprite.AnimationName,5)

    How do I test things like "if playing" and "if finished" with that? Do I just take it to the system expression editor?

  • I'm sure it should be done with variables, but for animation systems I like to refer directly to the animation names, so I can check when animations are finished, etc. Is there a way of picking multiple animation names using a wildcard? Something like "If 'Shoot*' is playing", so all animations beginning with the word Shoot are referenced?

  • You do not have permission to view this post

  • Here we are, an example: https://www.dropbox.com/s/tyoo2tge1p2ti ... .capx?dl=0

    It's basic, but the knife DOES come back, unfortunately it doesn't find it's way over the tiles, because I did this without the plugin and have no idea how to set it up to avoid solids? Disable 14 & 15 to watch the knife bumble about hopelessly.

  • You do not have permission to view this post