[REQUEST] Tilemap Expression

Discussion and feedback on Construct 2

Post » Wed Dec 18, 2013 6:50 pm

@Thndr Basically how many tiles in the tilemap. Not blank and tile type.
I already posted the first post, we have no event if the tiles are 0 just as full blank tiles. No workaround exists.
What for? I'm making a breakout game which it runs very good on mobile devices, instead of 200 sprites. There a big problem, what happens when all tiles are erased? It can't get next level without this expression. I couldn't finish this game.
Every developers would use this expression to get value from tile count for some reasons like map editor, dynamic platform, puzzles, etc.

@zenox98 None of your business. Joannesalfa2013-12-18 19:01:46
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Sat Dec 21, 2013 2:46 am

Bump
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Sat Dec 21, 2013 3:18 am

I've never worked with destroying tilemap tiles, but if you know how many bricks are in the level, can't you just add to a variable or something each time a tile is destroyed until you reach the total number of bricks?
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Sat Dec 21, 2013 3:39 am

@Burvey I've added a variable before, but the result is not perfect, too much to explain... however you can try it yourself.

https://dl.dropboxusercontent.com/u/76227787/BreakTiles.capx
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Sun Dec 22, 2013 6:15 pm

Bump
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Sun Dec 22, 2013 7:50 pm

Hello Joannesalfa,

I admire the persistance and I indeed believe more expressions for tilemap, including tilecount, could be helpfull and increase the power of c2. Or make it even more easier to use. This is in fact true for many of the behaviours and objects.

For your example, on the other hand, it was rather easy to implement another solution. Just added a tilecount variable, and I am reducing it by 1 everytime a tile is destryed, ie. when you create destruction particles. At zero tile count, level restarts.

You can find it working, here:
https://www.dropbox.com/s/i8juow37bg2y4al/BreakTiles.capx

Also, I am noticing that your expressions are sometimes missing the mark because of the way you are building your sentences. Trying to explain it more clearly or in a different way, or with an example may help.

Regards.
B
18
S
4
G
1
Posts: 332
Reputation: 3,149

Post » Sun Dec 22, 2013 8:23 pm

@Windwalker Oh no, you aren't supposed to count tiles by your own count, it would be bad practice.

I'm requesting Ashley to include tiles.count to avoid hard work.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Fri Jan 10, 2014 2:42 am

Remind
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests