How do I move to different layouts?

Get help using Construct 2

Post » Tue Jun 23, 2015 10:49 am

The struggle is real :(! Do you have any clue how to check it or there is multiple ways to check it?
B
8
S
3
Posts: 120
Reputation: 989

Post » Tue Jun 23, 2015 11:03 am

Frap1K wrote:The struggle is real :(!


I'm not sure what you mean..
A big part of learning to program is making mistakes and solving them..
It's the best way to learn and remember..

Computers are stupid, you have to tell them exactly what you want..
If you say:"walk to the table and sit down" to a person, the person will walk to the table, grab a chair and sit down on the chair..
If you say:"walk to the table and sit down" to a computer, it will sit down..
if you say:"walk to the table and when you have reached the table sit down"
The computer will still not grab a chair and sit down on the chair, it will just sit down next to the table..
If you want it to grab a chair and sit on it, you have to tell it specifically to do that..

So often you will think you have the right actions/commands, but will find out the computer doesn't understand..
Solving those situations will make you a better programmer..
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

Post » Tue Jun 23, 2015 11:05 am

Frap1K wrote:The struggle is real :(! Do you have any clue how to check it or there is multiple ways to check it?


To check it you have to compare the variable..
It's pretty simple..
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

Post » Tue Jun 23, 2015 11:13 am

Ok thanks for the speech :D I know that I just never ever did this before that's why it's easier to understand if someone shows how they did it but never mind then I guess will be trying to do what I don't know :) cheers! No offence! lol
B
8
S
3
Posts: 120
Reputation: 989

Post » Tue Jun 23, 2015 11:33 am

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

Post » Tue Jun 23, 2015 3:05 pm

Thank you for the visual reply it really helped to understand how this system works .. as it was my first time!
I would like to ask you for 1 more thing if it's ok with you? So here it is: When player has a hat or clothes on them as you go to another layout it will remove this all! Do I need to use variables to detect the items that the played have collected? so for example: On mouse object clicked hat set pos & pin to Player also set hat value to 1?
So in map2 I need to check it? so If Hat = 1 set hat pos & pin?
B
8
S
3
Posts: 120
Reputation: 989

Post » Tue Jun 23, 2015 3:17 pm

give the player a boolean variable HasHat and set it to true if he has the hat..

Create a special event sheet for player related events..
on that event sheet
Check if has hat is true and pin the hat to the player..
Include this event sheet in all your other event sheets, to prevent having to write the code in every one..
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

Post » Tue Jun 23, 2015 3:59 pm

How do I Include this event sheet in all your other event sheets? Do you mean Include the same event sheet to all layouts? sorry never did that as well :(
B
8
S
3
Posts: 120
Reputation: 989

Post » Tue Jun 23, 2015 4:02 pm

right click your event sheet and choose include..
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

Post » Fri Jun 26, 2015 11:15 am

Thanks @LittleStain I played around with it a bit! Got the idea. But I came up with a problem witch I don't know how to fix. How can I detect the items on the Layouts ? so when the player right click the hat it sets hats position to player point 1 and pins the hat to the player then if I go to layout 2 and drop the hat and then go to layout 1 the hat will be there in the same distance or place where you left it on layout 2. Any idea how to detect this? Thank you for future help!

edit*
B
8
S
3
Posts: 120
Reputation: 989

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: blue visionary, OBLIVION and 12 guests