How do I do that a character walk through to the solid block

Get help using Construct 2

Post » Thu Jan 29, 2015 6:38 pm

Hello,

So, I have a room with walls and the npc can walking inside of course. In the room there are solid block walls. That's why, the npc can't go through the walls, for exemple to the other room. But I (the player) can building doors on the walls if I want it. I would build walls where I want on the walls. (Otherwise it will be a top-view game). The problem is the npc won't go through the door because under the door there located the part of wall. The player can build the door anywhere on the wall.

You can imagine this situation as a problem of the river (as wall) and the bridge (door). I'd like to build a bridge above the river. Of course the npc doesn't go through the river and he's need a bridge. I can build a bridge anywhere part of the river. I was build a bridge but the npc couldn't walk through this, as the river stayed under the bridge and this one have a solid behavior and it overwrited the basic non-solid behavior of the bridge for some reason. I don't know why. The bridge on upper layer than the river.

I need a simple solution. I hope you understood what I want and the situation as well. Thank you!
B
5
S
1
Posts: 37
Reputation: 441

Post » Thu Jan 29, 2015 6:52 pm

I think the simplest way is to use the "On Collision" with object "door" condition, object "Player"-> "Set Position" (X,Y) action to the other side of the door.
B
5
Posts: 23
Reputation: 317

Post » Thu Jan 29, 2015 6:58 pm

I understand you trouble, in fact the water where you place your bridge doesn't desapear and npc can't take your bridge... and because you can place a bridge everywhere you can't desable a specific part of the "river" ... I don't know how to do it, especialy if you can build many bridge...
B
5
Posts: 46
Reputation: 334

Post » Thu Jan 29, 2015 7:29 pm

After I thought about it some more, I think you should try this action from the manual

scirra.com/manual/132/common-actions

Set position to another object
Position the object at another object. It can also be positioned relative to an image point on the given object

If you make an instance so that when NPC on collision with door object, the NPC Set position to image point outside of collision box then you don't have to rewrite an event for every instance
B
5
Posts: 23
Reputation: 317


Return to How do I....?

Who is online

Users browsing this forum: agg1401, Yahoo [Bot] and 26 guests