Any tutorials on Arrays?

For questions about using Classic.

Post » Sat Nov 27, 2010 2:05 am

I have no idea on how Arrays work. I tell construct to save the layout(?) and when I press a button, load the array it saved, to test level design. To my dismay, this does nothing. How exactly does this work?

[size=50:991gvr9b]Also, I'm stuck between making two different games:

'Crosshair'; The game about avoiding getting shot by a sniper while avoiding many deathtraps and physics traps. [This has a Thread]

OR

'The Nether'; A game about a man being sent to hell, and having him fight his way out.[/size:991gvr9b]
B
26
S
7
G
5
Posts: 202
Reputation: 5,235

Post » Sat Nov 27, 2010 4:22 am

We need to see a CAP file before we can really help you with your problem. It's hard to see what's wrong without seeing it.
Moderator
B
97
S
36
G
19
Posts: 1,584
Reputation: 17,692

Post » Sat Nov 27, 2010 6:26 am

[quote="linkman2004":2thhob04]We need to see a CAP file before we can really help you with your problem. It's hard to see what's wrong without seeing it.[/quote:2thhob04]

http://www.megaupload.com/?d=LWF40XBI

I added some little things in-game to tell you how to move and walljump. :)

Logic: Array saves on the start of layout. Press R to Load the array.
B
26
S
7
G
5
Posts: 202
Reputation: 5,235

Post » Sat Nov 27, 2010 10:08 am

[quote="Phobos002":b300gie4]I have no idea on how Arrays work. I tell construct to save the layout(?) and when I press a button, load the array it saved, to test level design. To my dismay, this does nothing. How exactly does this work?[/quote:b300gie4]

Well, Quicksave doesn't magically use an array just because you want it to. :P
You can use Quickload to load the state you saved or use "Save/load to disk" action of the system object in order to use permanent savegames.

However the buildin save/load features may cause problems. So it might be better to use your own method.

Think of an array as a table that holds values in each cell. Now it's up to you to do whatever you like with it. In case you didn't check it out yet: Array Object on the wiki.

While I'm not aware of a tutorial specifically targeted at arrays, I do believe the puzzle example I made gives a good practical insight in how to use arrays. Maybe have a look at this cap: [url:b300gie4]http://dl.dropbox.com/u/2306601/puzzexam1_array.cap[/url:b300gie4]

On a sidenote I advice against using the Advanced Camera plugin, since it's outdated. Linkman himself provided the superior MagiCam plugin. You should get that one instead! :)
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Sat Nov 27, 2010 3:56 pm

[quote="PixelRebirth":6h6eqmwv][quote="Phobos002":6h6eqmwv]I have no idea on how Arrays work. I tell construct to save the layout(?) and when I press a button, load the array it saved, to test level design. To my dismay, this does nothing. How exactly does this work?[/quote:6h6eqmwv]

Well, Quicksave doesn't magically use an array just because you want it to. :P
You can use Quickload to load the state you saved or use "Save/load to disk" action of the system object in order to use permanent savegames.

However the buildin save/load features may cause problems. So it might be better to use your own method.

Think of an array as a table that holds values in each cell. Now it's up to you to do whatever you like with it. In case you didn't check it out yet: Array Object on the wiki.

While I'm not aware of a tutorial specifically targeted at arrays, I do believe the puzzle example I made gives a good practical insight in how to use arrays. Maybe have a look at this cap: [url:6h6eqmwv]http://dl.dropbox.com/u/2306601/puzzexam1_array.cap[/url:6h6eqmwv]

On a sidenote I advice against using the Advanced Camera plugin, since it's outdated. Linkman himself provided the superior MagiCam plugin. You should get that one instead! :)[/quote:6h6eqmwv]

I used Quicksave and Quickload before. It just didn't work with the Advanced Camera thing. I forgot to delete the Quicksave action before I uploaded the cap. XP

Thank you though! I shall read the Wiki and view the cap file of awesome. Thanks for the help! :D
B
26
S
7
G
5
Posts: 202
Reputation: 5,235


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest