Charas-Project
Game Creation => Requests => Tutorials => Topic started by: Vlad Shadeu on August 07, 2009, 10:02:41 PM
-
(In General) What are arrays, how are they used, and where are they useful?
(Specific) how would one use them in Game Maker?
-
Arrays are a type of variable.
I honestly don't know the technicalities behind it, but it basically makes it so that the specific variable has different indices.
To make an array, do this:
variable[0]
variable[1] (bracket's are important)
They're often used to cut down on how many variables you have, as Game Maker, specifically, has a tendency to delete variables when they're not being called at that moment, causing humongous glitches in step events.
You can use them for damn near everything.
I personally use them for stats, or having different timers in things.
Just experiment, and see what you come up with.
-
"indices"?
I'm sorry, i still dont quite get it.
-
Index's.
It's basically storing a bunch of mini-variables inside of one variable.
So then:
global.roomnext[0] can = "room0"
and global.roomnext[1] can = "room1"
-
How do i set an individual mini-variable and how do i call a specific mini-variable?
-
Same as a variable.
Just get the variable (vari) and add a bracket with a number in it (vari[0]) in the create event.
As far as I know though, you can only use the ones you call.
-
Oh yeah, do you think you could do a little bit on the TACT engine? Just enough to get people interested.
-
Sorry, not at the moment.
As I've mentioned before, too busy.
-
Okay then.........