Go to layout + go to position = FAIL!

Get help using Construct 2

Post » Fri Aug 19, 2016 11:53 pm

Message: Anteaterman23 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
What I currently have is that, on a layout (we'll call it layout 1), I have an object. When you click that object, it teleports you to another layout (we'll call it layout 2), then teleports the player in layout 2 to a specific position. These two events happen because of the same action (clicking and object in layout 1), and are staged in the correct order (go to layout, then go to position). However, when I click the object in layout 1, you are transferred to layout 2, but not teleported to the position.

So, I tried another method. I had it so when you clicked the object in layout 1, you would go to layout 2, the player in layout 2 would be destroyed, then a new player would be created in the position I wanted him to be in. When I tested, the player was once again transferred to layout 2, but the player was not destroyed or created in a new location.

It seems the engine is forgetting the other actions I told it to trigger on that event, and only wants to transfer to layout 2. Layouts 1 & 2 run on the same event sheet, I just can't seem to figure out the problem. Bug, maybe?

Here's a .capx, showcasing the first method I tried:
https://drive.google.com/open?id=0B0-QDb64PcxxUS12SUNsQ0FXRHM
B
7
Posts: 5
Reputation: 287

Post » Sat Aug 20, 2016 12:54 am

No, not a bug.
Use a global to store the xy's.
Image ImageImage
B
169
S
50
G
174
Posts: 8,325
Reputation: 110,794

Post » Sat Aug 20, 2016 1:03 am

I just made this for someone else, may be somewhat relevant.

https://www.dropbox.com/s/dkqrwnwdz75qh ... .capx?dl=0
Mistakes were made.
B
52
S
26
G
109
Posts: 1,616
Reputation: 61,653

Post » Sat Aug 20, 2016 9:45 am

Your own project with a global player. Notice that there is no player in layout 2 in the layout editor.

https://www.dropbox.com/s/2qu8fm6535npz ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat Aug 20, 2016 1:57 pm

Alright, 99Instances2Go solved my problem. Thanks a lot!
B
7
Posts: 5
Reputation: 287


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider] and 45 guests