![]() |
2 dimensional arrays
How do I create and use 2 dimensional arrays? I know how to use normal arrays in graal but how would I do something along the lines of this:
this.array={{1,2,3,4,5,6},{11,22,33,44,55,66}}; And I would access it with something like: message #v(this.array[0][1]); which return the value 22 would something like this work like how I want it above? this.arrayy1={1,2,3,4,5,6} this.arrayy2={11,22,33,44,55,66} this.array={this.arrayy1,this.arrayy2}; |
That should work.
|
Im having trouble tracking the number in the sub arrays (this.arrayy1 and this.arrayy2). How do I track those while tracking the this.array? Right now I use a 'for()' event to do the this.array.
|
Before I continue; are you trying to do this in gs1? IS gs2 enabled on whatever server you are trying this on?
|
Im doing this in gs1 in the level editor for an arcade game but Im trieing to make a tile based arcade game that uses 2 dimensional arrays. I know how arrays work, just I dont how to get them to work in gs1 or gs2.
|
Multidimensional arrays don't work in GS1. Period.
|
Quote:
|
bummer =[
What about gs2? |
gs2 would work like you said.
i.e. chat = this.var[0][4]; etc. etc. |
| All times are GMT +2. The time now is 12:18 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.