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

0 favourites
  • 4 posts
From the Asset Store
Perfect for your zombie game! Animated from motion capture data Left, Right, Top Down!
  • 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!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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...

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

    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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)