I been experimenting with the coding that Pyoro gave me many moons ago for the animated car Parks.
I think I found a problem in the coding as I feel that I have fixed it.
It the menu there are 2 to choose from and each one would then give you 4 options.
However the one of right when place tiles in game they would glitch.

- MenuforMultiselect.png (26.14 KiB) Viewed 5310 times
these lines was left out of the second option.
Code: Select all
//calculate ground sprite for object
switch (FEAT_OBJECTS, SELF, switch_path01_2_object, [
//tile slope offset in storage register 0
STORE_TEMP(slope_to_sprite_offset(tile_slope), 0),
//terrain type in storage register 1
STORE_TEMP(GROUNDSPRITE_NORMAL, 1),
STORE_TEMP( (nearby_tile_terrain_type(0,0) == TILETYPE_DESERT) * GROUNDSPRITE_DESERT, 1),
STORE_TEMP( LOAD_TEMP(1) + (LOAD_TEMP(1) == 0) * 4512 * (nearby_tile_terrain_type( 1, 0) == TILETYPE_DESERT), 1),
STORE_TEMP( LOAD_TEMP(1) + (LOAD_TEMP(1) == 0) * 4512 * (nearby_tile_terrain_type(-1, 0) == TILETYPE_DESERT), 1),
STORE_TEMP( LOAD_TEMP(1) + (LOAD_TEMP(1) == 0) * 4512 * (nearby_tile_terrain_type( 0, 1) == TILETYPE_DESERT), 1),
STORE_TEMP( LOAD_TEMP(1) + (LOAD_TEMP(1) == 0) * 4512 * (nearby_tile_terrain_type( 0,-1) == TILETYPE_DESERT), 1),
STORE_TEMP( LOAD_TEMP(1) + (LOAD_TEMP(1) == 0) * GROUNDSPRITE_NORMAL, 1),
STORE_TEMP(terrain_type == TILETYPE_SNOW ? GROUNDSPRITE_SNOW : LOAD_TEMP(1), 1),
STORE_TEMP(snowline_height == 0xFF ? 0xFF : nearby_tile_height(0,0) - snowline_height, 255),
STORE_TEMP((LOAD_TEMP(255) == -1) ? GROUNDSPRITE_SNOW_1_4 : LOAD_TEMP(1), 1),
STORE_TEMP((LOAD_TEMP(255) == 0) ? GROUNDSPRITE_SNOW_2_4 : LOAD_TEMP(1), 1),
STORE_TEMP((LOAD_TEMP(255) == 1) ? GROUNDSPRITE_SNOW_3_4 : LOAD_TEMP(1), 1)
]) {
switch_path01_2_view;
}
graphics {
default: switch_path01_2_object;
Since I added them no more glitching.
So now we can have multiple sections.
With the pathways I did in AuzTownObjects I hope to change all these so have a choice of path types.
Can now have 4 paths types to choose from as shown in this image.

- NewPaths04.png (36.87 KiB) Viewed 5310 times
Or if like can have all the paths the same and 4 different types of lighting.
Or you can have 2 types of paths and each path type have 2 different types of lighting.
probably be other combinations as well.
Any way, if your doing any object coding and like to use multi-select choices with some of your objects here the code and templates.
I colour coded some .png files so can see what connects with what. Also a sample of the paths so can see how it works.
Now I have some pathways to do.
Cheers