when i start my game, i want no map file to be loaded, but rather the map is made with code after the game is run.
how do i go about do this, in world() new() ?
ID:163006
Oct 25 2007, 12:59 pm
|
|
Oct 25 2007, 1:04 pm
|
|
It's a world variable.
|
In response to Kaiochao2536
|
|
im aware, but i wanna use a var to setboth x and y without changing both maxx and maxy
|
In response to FallingLegend
|
|
FallingLegend wrote:
im aware, but i wanna use a var to setboth x and y without changing both maxx and maxy Set both x and y what? There are only 3 variables to determine the size of the map. maxx, maxy and maxz. maxx and maxy determine the dimensions of the map, and maxz determines how many map "planes" there are to work with. |
In response to Foomer
|
|
set just both maxx and maxy using a variable, but it says it expected a constant expression.
|
In response to FallingLegend
|
|
You can either set world dimensions in the code:
world Or at runtime like this: mob/verb/SetWorldSize(nx as num, ny as num) Although you'll want to make sure world.maxz is at least 1 all the time, unless you're happy sitting in null. |
In response to Foomer
|
|
not a verb, something like this.
var/XY = 5 |
In response to FallingLegend
|
|
FallingLegend wrote:
not a verb, something like this. > var/XY = 5 In other words: world But really if you're going to set it at world new, you might as well just pre-set the vars in world. |
In response to Foomer
|
|
i cant set both vars with one var, it just doesnt work, it says it was looking for a constant value when i do so, and this way just doesnt work.
|
In response to FallingLegend
|
|
You're trying to unnecessarily set a var with a var. All you need is
world because doing this: world or this: var/xy=5 is pointless, useless, and not needed. Making a var xy won't change both maxx and maxy because you're only changing one of them. |
In response to Kaiochao2536
|
|
anyways, um, i was trying to change both x and y with the one variable, and that variable will be also used in calculating the number of squares, and the offset of things.
|