How do I make a global object choose position in layout

Get help using Construct 2

Post » Thu Jan 15, 2015 3:49 pm

Hi

I'm working on a game to educate my employees about what steps are needed to get into the factory. I call it... "Get Into the Factory" We are a food manufacturing facility, so you must wash hands etc before entering. The layouts switch from top down view to 1st person.

I have several sinks on the map, and when you switch from the sink layout, the player reappears in the same position (next to the door sink). Is there a way to get the player to position next to the sink they went to? For ex, if there are 5 sinks, and the player goes to sink 2, be reappears at sink 5, because I have the set position go to layout set to sink 5. But I'd like it more if a player went to sink 2 and reappeared at sink 2.


.capx attached, Much thanks if anyone can help!

Get Into the Factory.capx
You do not have the required permissions to view the files attached to this post.
B
9
S
1
Posts: 18
Reputation: 526

Post » Thu Jan 15, 2015 4:36 pm

Not sure this is what u want exactly... Hoping this at least gives u an idea.. or fixes ur problem. I added the "Persist" Behavior to the Player, and added and event Where when Player is Overlapig Sink. They Have to Press "Space" to Use sink.. Reason I had to do that was because when the Player went back from the layout. They went back to the Sink they were at. Only it Kept opening the sink layout on leave. Hope this helps
You do not have the required permissions to view the files attached to this post.
B
8
S
1
G
1
Posts: 96
Reputation: 632

Post » Thu Jan 15, 2015 5:04 pm

I would create a variable that holds the value of my position right before I move to the next layout...
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Thu Jan 15, 2015 8:49 pm

Wow, y'all are quick!

David-
I had to download a new version to see the capx. That worked! It is exactly what I wanted (show up next to the sink you came in on). It would be nice to get rid of the space bar, but maybe I will add it to the other interactions so that the player expects to use the space bar to "use" things.

Desi (I'm gonna call you that now because you helped me so we are best friends) -
That sounds elegant, I'm gonna try it out. In theory I'm going to have many more items that are spread through out the factory, so it might be a good idea to use that variable for all of them
B
9
S
1
Posts: 18
Reputation: 526


Return to How do I....?

Who is online

Users browsing this forum: darkrealos, dop2000, Rhindon and 25 guests