How do I create a room for my player to enter?

0 favourites
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • The current game I'm working on has a system of rooms for the character to enter and search for an object. I want him to walk up to the door, and once he's in front, press a button to enter. How can I do this?

  • On pressed button

    Character is overlapping door

    Open door.

  • Do I need to create a sub-event for this? And I'm not finding an "open door" command, unless you mean "move to layout".

  • Put On pressed Button and overlapping door in one "And" Event.

    No, there is no open door command

  • Ah, I got it . Thanks! So I figured out how to switch to a different layout when I overlap and press the button. Now comes an even more noob question....how do I get my sprite to spawn when the new layout starts up?

  • swordofsolace

    Sub-event means that if the previous event is true, so the next events that is "inside" of another event will run.

    Doens't exist an "open door" command. What Rabenmutter meant is that you need to create an sprite and load an image of a door.

    Then you an event like this:

    if character is overlapping the sprite "door"

    than go to layout "room"

    So you need to create another layout with your map "room" before doing this

    Edit: forget it haha

    "on start of layout" -> spawn the object.

    There is spawn to another object and to a positon where you need to input the coordinates

  • Make a new event sheet for the new layout.

    On start of layout

    spawn charactersprite

  • So that would be "Spawn another object" right?

  • And I appreciate it Koss

  • System-> Create Object

  • Awesome. Now, the layer I'm trying to add it to says "it needs an expression after it". I'm not quite sure what this means.

  • Edit: Ok, so I added "x" after the layer, aka tiledbackground14.x and my player now spawns where I want him to. However, I'm unable to move my character at all. Anything else I need to add to the spawn event?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How do you move the character in your former layout?

  • Oh, do I have to add all of that to the new layout? Isn't there any way I can transfer the events from the first layout into the second without writing it all over again? I'd heard that creating tons of event pages for layouts can bog down the game, so I'm trying to avoid this.

  • You can use eventsheets in several layouts. Just add them.

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