How do I

Get help using Construct 2

Post » Wed Aug 27, 2014 8:46 am

Hi guys,

I need your desperate help for this. I'm a simple art teacher and i don't know much about programming.

I completed this tutorial "Making an Interactive Treasure Map" <https://www.scirra.com/tutorials/322/making-an-interactive-treasure-map/page-1>
everything is working great but i want to lock the level ( layout) after it has been viewed once. To make it more simple, after that the player has completed the first level ( or any other levels) and the next level has been shown i dont want the player to be able to access the previous level.

I have been working with lots of instance var but no use. I have done everything like the tutorial and it works great but the tutorial does not have this function as well.

I would really appropriate your helps,

Thanks
B
8
Posts: 12
Reputation: 330

Post » Wed Aug 27, 2014 8:57 am

Having not done that tutorial and you not providing a capx, it is hard to guess at best approach.

1 option:
Create Variable Level1, level2, level3 etc
On start of layout level1 set Level1 to 1. On start of layout level2 set level2 to 1 etc

Now you have a check on your map you can disable buttons or make sprites no clickable by putting in condition that level1 = 0

I see it uses some variables locationnumber and latestknownlocation and checks that player is greater than or equal

Just create a new event checking that player locationnumber is less than players location make invisible or whatever
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Wed Aug 27, 2014 9:07 am

If you want it semi-permanent (even if they close and open the game) add the WebService object and set a localkey with "1-layout" to start. on each map advancement, increment that name. When choosing the layout to load, make sure that the layout name is corresponding to that value ("1-layout). When you are ready to give them the next layout, set it to "2-layout"
B
32
S
6
G
2
Posts: 317
Reputation: 2,801

Post » Wed Aug 27, 2014 1:23 pm

DUTOIT wrote:Just create a new event checking that player locationnumber is less than players location make invisible or whatever

Thank u guys, it worked (not what i exactly had in mind but it is good)
I did do exactly what u said locationnumber<location and magic :) thank u DUTOIT

IndieKiwi, thank u for ur respond and help. Since im new to C2 is WebService the same as Webstorage ?
Sry for the stupid question :?
Thank u again
B
8
Posts: 12
Reputation: 330

Post » Wed Aug 27, 2014 8:26 pm

PayamausIra wrote:
DUTOIT wrote:Just create a new event checking that player locationnumber is less than players location make invisible or whatever

Thank u guys, it worked (not what i exactly had in mind but it is good)
I did do exactly what u said locationnumber<location and magic :) thank u DUTOIT

IndieKiwi, thank u for ur respond and help. Since im new to C2 is WebService the same as Webstorage ?
Sry for the stupid question :?
Thank u again

Sorry i meant Webstorage, webservice is something else.
B
32
S
6
G
2
Posts: 317
Reputation: 2,801


Return to How do I....?

Who is online

Users browsing this forum: luck1210 and 3 guests