How do I get my player to move to another layer & other stuf

0 favourites
  • 11 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • I need to get my player to move between layouts (rooms in the game) when he shoots the door and collides with it by running into the open door.

    I also need to know how to make a visible representation on the amount of Energy (health) the player has left in numbers on the screen.

    I also need to know how to get music to play on a layout and stop playing when you leave the layout.

    Thanks to anyone who can offer suggestions

  • My suggestion, and please adhere to this, is read the tutorials and watch some YouTube about Construct 2 before asking these basic questions. These are things everyone should know before coming here to ask. I wish I was being elitist, but everyone who reads and follows a few tutorials won't come in here quite as often for things like this. I comprehend not understanding theory (I'm still lost regarding arrays, though it's the first thing you learn about in Computer Science) but many things you're asking is WHY Construct 2 was made: to make the basics easier and get a product out quickly.

  • I tried to find it on scirra tutorials, but the tutorials are only for health METERS, not counters, unfortunately.

    As for moving to another layout, I can do that but I can't teleport the player there as well.

    So instead of making us both waste time replying to a non-answer, why not actually answer the question.

    I get you're trying to help, but it would be more helpful to tell me which event to look for.

  • My internet is being an absolute pain at the moment so I can just post images, these 3 events will do everything you want, if the internet Gods are kind I'll pop back and explain them, but they're so fundamental they border on self-evident.

  • My internet is being an absolute pain at the moment so I can just post images, these 3 events will do everything you want, if the internet Gods are kind I'll pop back and explain them, but they're so fundamental they border on self-evident.

    I know how to move to another layout, my problem is getting the player character to get to the other layout.

    Is there a teleport event with which I can move him to the other layout to continue playing?

    Thank you tons! I kept having trouble figuring out why it didn't work because I used different event sheets and " " marks, and when I included each other event sheets (because I keep the UI and Health/Ammo sheet seperate) the game froze.

    Took me about a minute flat to figure it out after you showed me, thank you so so much.

    As for the audio, does it have to be a specific file format? I have a song in .m4a but it won't play, as either Play or Play by Name.

    -Note: I tried it with another format and it did work. Turns out just the format wasn't working, but thanks for confirming the method I used.

    Thank you very much Mr E Bear!

  • You can either use events to spawn your player objects onto the layout, or simply place them on the layout in the layout view.

    For audio, you want it to be both .ogg and .m4a

    https://www.scirra.com/manual/84/sounds-music

  • What about if I want to have an animation of the player running out of the door with the door closing behind him?

    The problem is that say, a layout has two doors, the door on the far left, is supposed to lead to say, room3, and the door on the far right is supposed to lead to room1. Can I use crtl+drag or do I have to make duplicate objects in the project menu and assign separate events?

    I wish Construct2 had a "On Collision with UID ' ' ", that would be cool.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use separate objects.

    Alternatively you can create an "exit" object with an instance variable of "level", you can then dictate your events based on the value of each exits level value.

    I'm ad-libbing here, and I've never tried it but it might work, you could try adding a "pick by unique id" event to your exit collision as a conditional.

    To change layouts after an animation has finished, you would simply use the "on animation finished" event prior to your got to layout action.

  • How can I spawn player objects into another layout? Because I want him to be able to move between layouts,

    Or am I going to have to make 2 different layouts, one where he comes in from the right and another from the left?

    There's no "Move object to x layout"?

  • on start of layout - player set position?

  • I made some door logic, but whatever I do the door either stays open eternally or closes as if the variable didn't exist.

    Here is my latest try, it closes even if the player is inside the door/overlapping. Am I doing something wrong or is this a Construct2 bug?

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