Hello,
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:
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;
}
}
The NML compiller is reportin 1 ERROR and 1 WARNING:
* 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 spriteI 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.