Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • Tutorials »
  • Explanation needed (and some GM help)
« previous next »
  • Print
Pages: [1]

Author Topic: Explanation needed (and some GM help)  (Read 4474 times)

Offline Vlad Shadeu

  • Menace
  • Zealot
  • *
  • Posts: 540
  • Oh to be dumb again.
Explanation needed (and some GM help)
« 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?
Logged

Offline fruckert

  • Star-Star-Star-Star
  • Sage
  • *
  • Posts: 8,148
  • Not intended for public consumption
Re: Explanation needed (and some GM help)
« Reply #1 on: August 07, 2009, 11:27:55 PM »
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.
Logged
Quote
Ellie: I had a slice of ham in my hand. I was going to drop it, so I slapped it hard. It attached itself to the wall

Offline Vlad Shadeu

  • Menace
  • Zealot
  • *
  • Posts: 540
  • Oh to be dumb again.
Re: Explanation needed (and some GM help)
« Reply #2 on: August 08, 2009, 12:02:52 AM »
"indices"?

I'm sorry, i still dont quite get it.
Logged

Offline fruckert

  • Star-Star-Star-Star
  • Sage
  • *
  • Posts: 8,148
  • Not intended for public consumption
Re: Explanation needed (and some GM help)
« Reply #3 on: August 08, 2009, 12:05:50 AM »
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"
Logged
Quote
Ellie: I had a slice of ham in my hand. I was going to drop it, so I slapped it hard. It attached itself to the wall

Offline Vlad Shadeu

  • Menace
  • Zealot
  • *
  • Posts: 540
  • Oh to be dumb again.
Re: Explanation needed (and some GM help)
« Reply #4 on: August 08, 2009, 12:14:07 AM »
How do i set an individual mini-variable and how do i call a specific mini-variable?
Logged

Offline fruckert

  • Star-Star-Star-Star
  • Sage
  • *
  • Posts: 8,148
  • Not intended for public consumption
Re: Explanation needed (and some GM help)
« Reply #5 on: August 08, 2009, 12:21:37 AM »
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.
Logged
Quote
Ellie: I had a slice of ham in my hand. I was going to drop it, so I slapped it hard. It attached itself to the wall

Offline Vlad Shadeu

  • Menace
  • Zealot
  • *
  • Posts: 540
  • Oh to be dumb again.
Re: Explanation needed (and some GM help)
« Reply #6 on: August 08, 2009, 12:32:41 AM »
Oh yeah, do you think you could do a little bit on the TACT engine? Just enough to get people interested.
Logged

Offline fruckert

  • Star-Star-Star-Star
  • Sage
  • *
  • Posts: 8,148
  • Not intended for public consumption
Re: Explanation needed (and some GM help)
« Reply #7 on: August 08, 2009, 12:35:40 AM »
Sorry, not at the moment.
As I've mentioned before, too busy.
Logged
Quote
Ellie: I had a slice of ham in my hand. I was going to drop it, so I slapped it hard. It attached itself to the wall

Offline Vlad Shadeu

  • Menace
  • Zealot
  • *
  • Posts: 540
  • Oh to be dumb again.
Re: Explanation needed (and some GM help)
« Reply #8 on: August 08, 2009, 12:40:13 AM »
Okay then.........
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • Tutorials »
  • Explanation needed (and some GM help)
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum