saf's Recent Forum Activity

  • So, I have a global varibale with initial value of 100, every 0.1 sec, 0.1 is subtracted from the varible (making it a 0.1 sec countdown timer) and sprite font is updated so that it shows correct "time". So it shows something like:

    100

    99.9

    99.8

    ...

    99.2

    99.1

    99

    98.9

    Id like it to show 99.0 too, how can I achieve it? I've tried to googleing it, also tried some *100, /100 variants, but with no avail. Any advice is apriciated!

  • Thanx man, it looks like a good start, however, it seems jimwills is right, even in this example, the player sprite will fall through the jumptrough tile (?!) when landing on it after a jump...

    Moreover, usage of the tilemap (in my case) was to reduce the number of object I use in the layout, to optimize my game for mobile, yet this setup is even more CPU consuming than just using individual objects... Not sure what object count is the threshold...

    The above tileeraseoncollision (2).capx uses 35% of my CPU and I get 50 FPS at most, and this one:

    https:// dl.dropboxusercontent.com/u/6116050/spawnoncollision .capx

    I get 60 FPS and 12% CPU usage... will test a bit more with more objects to see how it affects the CPU usage....

  • yeah, no go... I think I found a solution, I just can't make it work (need some help)... So, collision with a tile erases the tile but spawns the sprite (same png) with flash behavior that flashes for 0,5 sec and gets destroyed when flashing ends... I just don't know how to spawn a sprite at exact same place the tile was

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thank you Minor, helped me a lot, never even heard of "image points" ! One more thing... How could I implement a "flash" of that tile lasting 0.5 s, and then deletion of it?

    Firstly, if I use flash behaviour on Tilemap, entire tilemap flashes, and if I use Wait 0.5 sec, then since the Sprite moves along in that 0,5, the "erase tile in respect to sprite x, y" will erase some other tile and not the one that was hit 0,5 sec ago...

    I'd like to achieve that player hits a tile, it flashes for 0,5 sec and then it gets "changed" (erased)...

    Anyhow, thanx for your help!

  • Hi fellas, I'm having some trouble with tilemap and collisions. Opened a new thread, but I'm still looking around for an answer, maybe you can help... The thing is, I have the following setup:

    white squares jumptrough tilemap z-index 0, black squares solid tilemap z-index 1, and a platform behavior sprite.

    I'd like to achieve that the black square on collision with sprite gets deleted so that white square tile gets revealed from underneath. I'm having trouble identifying the tile's x, y since the sprite's x, y is in respect to Cartesian coordinate system and the tile's x, y is in respect to tile's position in the tilemap... Here's a simple set up I've created so if anyone has a min or two to take a look:

    https: // dl.dropboxusercontent.com / u / 6116050 / tileeraseoncollision. capx

  • Yes, I've tired that (that's what I used, in the post above I simplified the code a bit, principle is the same), if you take a look here:

    https: // dl.dropboxusercontent.com / u / 6116050 / tileeraseoncollision. capx[/code:20zwv9em]
    
    (I can't post links yet)
  • Thank you for your replies, however, I'm still strugglin' with matching the sprites coordinates with the tile coordinates.

    I thought that something like this would work (over simplified):

    Sprite - on collision with - tilemapsolid -> erase tile at - sprite.x, sprite.y[/code:330yccn9]
    
    It doesn't...
    
    I've created very simple setup (only the sprite isn't a bullet, but rather a platformer, so if anyone has a min or two to take a look...Thanx
  • I'm struggling with tilemap and collisions in a platformer. I have two tilemaps, one is "black" squares and they are solid, and the other is "white" squares and they are jumptrough. I'd like to achieve that when a bullet sprite collides with a black square it gets replaced with a white square... So that only the black square that was hit by a sprite gets replaced with white square... Any advice is appreciated!

  • Yeah, I've tried to use the invisible "jump" trigger sprites, but they don't work as I expected and would need a ton of them on the level... There are "If wall is on the right" "If wall is on the left", is there something like "If edge is on the right"?

    I've also tried something like:

    "If Player.Y > Enemy.Y -> Enemy jump" but if the player is "under" the enemy, for example, the enemy is on top platform and the player on bottom platform, again, the enemy will just try to equalize the X and won't try to find an edge to "fall" down on lower platform...

    Would really love some solution like "Pathfinding" but with "Platformer movoement" in mind and not "8 direction movement"... Wouldn't that be great?!

  • Hi, still learning, and I'm stuck...

    I'm trying to make a enemy chase the player in a classic platform layout, and can't seem to figure it out. I've tried to play with line of sight and playing around with the conditions like "if player.X > enemy.X -> enemy move right" and "if player.X < enemy.X -> enemy move left" etc... and I've manage to accomplish the enemy following the player. But as soon as I jump with the player on a higher platform, I can't get the enemy to jump on the platform too. It just continues to follow the player sprite on the lower platform... Or if a player jumps across a gap in the platform, the enemy will just follow him and fall through the gap, and won't jump over it.

    Would like to make the enemies chase the player around the layout, jumping along and trying to catch and beat the hell out of the player

    Any tutorial out there, or any advice?

saf's avatar

saf

Member since 2 Nov, 2014

None one is following saf yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies