Apply solid behavior on the character and not on the Tile ?

Discussion and feedback on Construct 2

Post » Wed Oct 26, 2016 3:38 am

Hello,

When I apply the solid behavior on the TileMap, my character doesn't fall to the infinity (doesn't pass through the TileMap).
But I don't understand why the opposite doesn't work : when I apply the solid behavior on the character, and I delete it from the TileMap, my character pass through the TileMap:!:

Any idea why ?

Thanks for your answer!
B
17
S
10
G
19
Posts: 140
Reputation: 11,457

Post » Wed Oct 26, 2016 4:28 am

The solid behavior is like a marker that tells other behaviors to respond to the object in a certain way. So your solid TileMap didn't do anything to the platformer character, it just told the character to act like there was a floor, wall, etc.
Eh, Steve!
B
113
S
54
G
13
Posts: 112
Reputation: 16,090

Post » Wed Oct 26, 2016 10:28 am

@calebbennetts I'm still not satisfied but however thank you!
B
17
S
10
G
19
Posts: 140
Reputation: 11,457

Post » Wed Oct 26, 2016 1:41 pm

Try to think about it without programming in mind from a logical standpoint...even if the character is solid, why would it interact with a non solid terrain? (Think that you could need a non solid tilemap for a decorative background, for example. You would not want your character interacting with supossedly distant stuff like background clouds or mountains)
B
26
S
7
G
1
Posts: 71
Reputation: 2,072

Post » Wed Oct 26, 2016 3:00 pm

@Momio It's most understandable! thanks
B
17
S
10
G
19
Posts: 140
Reputation: 11,457

Post » Wed Oct 26, 2016 5:25 pm

As Momio said, solids of one object demands the behaviours of another object 'to here' and 'not further'. Those behaviours are :

8 Direction, which is blocked by Solids (An object with 8 direction, another that is solid)
Bullet, which can optionally bounce off Solids (An object as bullet, another that is solid)
Car, which bounces off Solids (An object as car, another that is solid)
Line-of-sight, which by default has line-of-sight obstructed by Solids (An object with LOS, another that is solid)
Platform, which can land on Solids. (An object that is platform, another that is solid)
Pathfinding, which by default uses solids as path obstacles. (An object with pathfinding, another that is solid)

So, you have always a pair. Solid on one object, a behaviour on another object. You break that basic principle by not pairing a behavior in one object with a solid in another object.

Besides that, a platform can got trough a solid with the Jump-thru behavior.
Last edited by 99Instances2Go on Wed Oct 26, 2016 5:34 pm, edited 1 time in total.
B
33
S
18
G
27
Posts: 2,441
Reputation: 20,346

Post » Wed Oct 26, 2016 5:32 pm

@99Instances2Go Thank you for your reply.

I have posted this question because I have a big tilemap and I search to otimize the game.
B
17
S
10
G
19
Posts: 140
Reputation: 11,457

Post » Wed Oct 26, 2016 5:36 pm

I have no idea what you exactly want to do ? Someone will help, if its known whatcha try to do.
B
33
S
18
G
27
Posts: 2,441
Reputation: 20,346


Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests