How do I have a persistant layout

Get help using Construct 2

Post » Sat Mar 14, 2015 2:22 am

So, I want to have the layout 1 persistant, so that everything continues on it when I am on another layout, If anyone could help that would be great :)
B
4
Posts: 14
Reputation: 228

Post » Sat Mar 14, 2015 2:37 am

This is not possible, at least i don't know how. What are you trying to do exactly? I think there are
ways around to find a solution for your case, but you should give more details.
B
11
S
2
Posts: 213
Reputation: 1,266

Post » Sat Mar 14, 2015 4:09 am

Yes, it's possible. But it depends on how you are building your game. The only method I know it's possible is to store every single change made by the player, regarding to the enviromment and everything, to an array and save it AsJSON in webstorage. Then, everytime you start a layout, you have to load the save and it will be updated and create the "persistent" world. However, it's really complicated in my opinion.
B
56
S
21
G
3
Posts: 602
Reputation: 6,612

Post » Sat Mar 14, 2015 8:33 am

Ok im making fnaf in construct 2 to see how good i can get it, now, what i want is for the game to detect when the doors are down (already done) but when i switch to the camera it doesnt register that the doors still, how would i make it do this?
B
4
Posts: 14
Reputation: 228

Post » Sat Mar 14, 2015 10:46 am

Make global variables, as they register through all layouts.

Something like global var DoorOpen = true

Then when you click to close door, make DoorOpen false. Then vise versa.

Then you can pull off something like when you close the door, Freddy starts knocking a bit then leaves.
B
9
S
2
Posts: 80
Reputation: 854

Post » Sat Mar 14, 2015 11:26 am

Start a new project in C2, search for the template Persistant. This example might be helpfull for your case.
It's time for me to return the favor :)
B
32
S
9
G
8
Posts: 132
Reputation: 4,870


Return to How do I....?

Who is online

Users browsing this forum: plinkie and 11 guests