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

Get help using Construct 2

Post » Fri Aug 22, 2014 8:00 pm

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 :)
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Sat Aug 23, 2014 9:31 am

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.
B
25
S
6
G
6
Posts: 265
Reputation: 3,696

Post » Sat Aug 23, 2014 3:32 pm

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.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Sat Aug 23, 2014 3:44 pm

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.
You do not have the required permissions to view the files attached to this post.
B
60
S
21
G
10
Posts: 643
Reputation: 10,320

Post » Sat Aug 23, 2014 6:17 pm

Mr E Bear wrote: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!
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Sat Aug 23, 2014 6:41 pm

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
Last edited by Elliott on Sat Aug 23, 2014 6:47 pm, edited 1 time in total.
B
60
S
21
G
10
Posts: 643
Reputation: 10,320

Post » Sat Aug 23, 2014 6:46 pm

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.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Sat Aug 23, 2014 6:51 pm

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.
B
60
S
21
G
10
Posts: 643
Reputation: 10,320

Post » Sun Aug 24, 2014 5:01 pm

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"?
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Sun Aug 24, 2014 5:15 pm

on start of layout - player set position?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: beohs, tunepunk and 9 guests