I would like to have a building tile, where there are two adjacend buildings placed, both from same random pool of 4 versions of this sprite. I have tried following code, but NMLC doesn't allow me to compile.
Code: Select all
random_switch(FEAT_HOUSES,SELF,rnd_streethouses_NW){
1: s_streethouse1_NW;
1: s_streethouse2_NW;
1: s_streethouse3_NW;
1: s_streethouse4_NW;
}
spritelayout l_streethouses_NW {
ground { sprite: GROUNDSPRITE_CONCRETE; }
building {
sprite: rnd_streethouses_NW;
xextent: 8;
yextent: 8;
zextent: 16;
xoffset: 0;
yoffset: 4;
zoffset: 0;
}
building {
sprite: rnd_streethouses_NW;
xextent: 8;
yextent: 8;
zextent: 16;
xoffset: 8;
yoffset: 4;
zoffset: 0;
}
}
* Block 'rnd_houses_NW' is not referenced, ignoring. - for line with random switch definition.
* Expected a reference to a spriteset. for line with sprite layour reference to sprite
I assume, that it means, I can't use rnd_switch once I am assigning sprites via sprite_layout, is that so?
Do you have any other idea, how to implement such a random sprite selection together with spritelayout?
Thank you very much.