Get solid enemies to pass one another

Get help using Construct 2

Post » Sat Mar 16, 2013 3:44 pm

I do appreciate the thought, but this wont solve my problem

[QUOTE=Zignide] Hmh...i have an idea, although i dont know how to express it in a theoric way, as im new xD

My idea would be to have 2 scenes, and a player character in each one, one pinned to the other one...
then have one solid in one scene and the other one in the other one, this way they wouldnt collide, and if a player is above one of them, it wouldnt fall down...

Hope this makes some sense, im a newbie, and im just trying to help a little, i dont know the exact commands to do this, im not even sure if you can have two scenes in the same layout, but...well, that would be my idea xD[/QUOTE]
B
18
S
4
G
3
Posts: 436
Reputation: 4,801

Post » Sat Mar 16, 2013 5:43 pm

Well this is a blatant case of me cheating but see if you can take this idea further.. basically abuse animations to set different collision areas, one allows them to pass over one another, another makes them full blockers when near a player.

http://dl.dropbox.com/u/116137178/Help/HelpWithColliders.capx
B
20
S
6
G
2
Posts: 157
Reputation: 3,109

Post » Sat Mar 16, 2013 7:13 pm

just give them platform behavior and then they wont fall though the solid "floor" piece.

platform behavior works with solids, you dont need to have them set to solid behavior and they will not pass solids.

Be sure to disable default controls, it the enemies.BACLog2013-03-16 19:13:57
B
22
S
5
G
1
Posts: 81
Reputation: 2,271

Post » Sat Mar 16, 2013 7:19 pm

[QUOTE=BACLog] just give them platform behavior and then they wont fall though the solid "floor" piece.

platform behavior works with solids, you dont need to have them set to solid behavior and they will not pass solids.

Be sure to disable default controls, it the enemies.[/QUOTE] genius
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Sat Mar 16, 2013 10:36 pm

As I mentioned before they have to be solid to act as a wall to block the player. So imagine dudes carrying shields pushing/shoving against the player. I did decided to place the solid on the player and leave the enemies with platform behavior with no solid. then whenever the player comes on collision with the enemy, vector x of the player is subtracted by nth value

[QUOTE=BACLog] just give them platform behavior and then they wont fall though the solid "floor" piece.

platform behavior works with solids, you dont need to have them set to solid behavior and they will not pass solids.

Be sure to disable default controls, it the enemies.[/QUOTE] retrodude2013-03-16 22:37:39
B
18
S
4
G
3
Posts: 436
Reputation: 4,801

Post » Sun Mar 17, 2013 8:40 am

Did you try my capx?
B
20
S
6
G
2
Posts: 157
Reputation: 3,109

Post » Sun Mar 17, 2013 4:24 pm

[QUOTE=silkc2] Did you try my capx?[/QUOTE]


Sorry for the late reply, but your capx file gives me an error and says "cannot find object texture file "wall.png" in project texture folder"
B
18
S
4
G
3
Posts: 436
Reputation: 4,801

Post » Sun Mar 17, 2013 6:35 pm

Yeah I get that too, must be a bug I somehow found in c2. Have lost everything I just did then, nice. :/

Anyway the concept is:
1, Enemy animation 1 - make collider smallest line possible at bottom of sprite
2, Enemy animation 2 - make collider full size as normal
3, Pin an invisible larger box around player
4, When enemy overlaps that box, set enemy animation to 2
5, When enemy not overlapping box, set animation to 1

Basically the flat collider lets them pass each other, then they get bigger colliders when near a player.
B
20
S
6
G
2
Posts: 157
Reputation: 3,109

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests