How do I set a tile based on another tile?

Get help using Construct 2

Post » Tue Apr 19, 2016 6:57 pm

Hi. I'm making a procedural dungeon game and I have tiles for every part of the wall.

Problem is, it looks like this: Image

I've tried something like (excuse pseudocode)
For Each Tile > Check Tile X+1 > If that is not same as X, check tile Y+1 > if Y+1 is not a tile, do not change anything (this is so it won't change horizontal walls) > If Y+1 is a tile, set tile XY to Z.

Help appreciated! Thanks.
B
8
S
2
Posts: 15
Reputation: 530


Post » Tue Apr 19, 2016 10:12 pm

@Ethan

I'm trying to put that into my program, but nothing changes. What am I doing wrong? I initiate the bitwise method on runtime but it just stays at the default tile. (0)
B
8
S
2
Posts: 15
Reputation: 530

Post » Wed Apr 20, 2016 2:50 pm

Are you using the tilemap method described in the tutorial, and not the tutorial itself which uses sprites and was made before tilemap support?

https://dl.dropboxusercontent.com/u/5426011/examples20/bitwise_tilemap.capx
B
43
S
23
G
20
Posts: 735
Reputation: 12,027

Post » Wed Apr 20, 2016 6:53 pm

@elek
Check following topic to make sprite/tile aware their neighbor/surrounding.
help-with-bitwise-not-adding-up-correctly-solved_t162671
ImageImage
B
108
S
49
G
23
Posts: 783
Reputation: 22,611

Post » Thu Apr 21, 2016 12:57 am

Message: elek can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
@Ethan @alextro

I have NO idea how to make this work, can someone show me how to implement it with this .capx here?

https://drive.google.com/file/d/0B1zBAuq6m_3jYjZweDVQcmdnRXM/view?usp=sharing
B
8
S
2
Posts: 15
Reputation: 530

Post » Thu Apr 21, 2016 5:59 pm

Bumping, would love some help.
B
8
S
2
Posts: 15
Reputation: 530

Post » Fri Apr 22, 2016 1:19 pm

Make work around tileset for the wall to match the bitwise order and end up with sprite solution. Take longer time when initiate but it works.

Check it: altium_edited
ImageImage
B
108
S
49
G
23
Posts: 783
Reputation: 22,611

Post » Fri Apr 22, 2016 4:42 pm

@alextro

This is perfect. Thank you so much.
B
8
S
2
Posts: 15
Reputation: 530

Post » Fri Apr 22, 2016 5:06 pm

@alextro

How would I set the center sprites to be black?

Like this:

Image
B
8
S
2
Posts: 15
Reputation: 530

Next

Return to How do I....?

Who is online

Users browsing this forum: richardfu and 28 guests