0 Members and 1 Guest are viewing this topic.

#### Eniripsa96

• LV2 Member (Next: 40)
• Posts: 28
• Rating: +3/-0
« on: April 09, 2011, 01:59:26 pm »
I need to initialize a GDB and I only want [01] to be the tile number in it to being with. Is there a way to initialize it with tons of [01] values without having to type out all the thousands (yup, i want thousands ) of [01]s? otherwise I'll have a sea of the following...

[010101010101010101010101010101010101010101010101]
[010101010101010101010101010101010101010101010101]
etc

I thought fill at first but that requires a value already in the object. Any ideas?

#### Builderboy

• Physics Guru
• CoT Emeritus
• LV13 Extreme Addict (Next: 9001)
• Posts: 5673
• Rating: +613/-9
• Would you kindly?
« Reply #1 on: April 09, 2011, 02:04:29 pm »
There is no way unfortunately to do this really the only way would be to do this:

Code: [Select]
Zeros(9001)->GDB11->{GDB1}Fill(GDB1,9001)
Which does require some extra code but is the best solution for screen space and source code size.

On a related note, and our of curiosity, what are you doing that requires thousands of 1's?

#### Eniripsa96

• LV2 Member (Next: 40)
• Posts: 28
• Rating: +3/-0
« Reply #2 on: April 09, 2011, 02:12:43 pm »
I am upgrading my maze game that had a 1-pixel dot for you moving around to a tile-based system. I change the 1s to 0s to path it, but seeing that code, it would probably be easier to do it the other way. But with this, I'll have a large, fully randomized maze where you can walk through to reach the exit. I hope I can get this to work, but I'm brand new to tilemapping and fairly new to Axe so lets see how far I get lol.

#### Builderboy

• Physics Guru
• CoT Emeritus
• LV13 Extreme Addict (Next: 9001)
• Posts: 5673
• Rating: +613/-9
• Would you kindly?