How do I make a global object choose position in layout

0 favourites
  • 4 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • 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!

    [attachment=0:j8weo8k8][/attachment:j8weo8k8]

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would create a variable that holds the value of my position right before I move to the next layout...

  • 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

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