What I could figure out with what others told me could have something to do with xextent: 16; yextent: 16; and zextent: 16;
But because I have 4 sprites I wonder if each sprite needs its own spriteset information?
Code: Select all
/* WOODBRIDGE */
spriteset (spriteset_woodbridge1) {
template_footbridge(18,8,"gfx/objects/woodbridge1.png")
template_footbridge(162,8,"gfx/objects/woodbridge1.png")
template_footbridge(306,8,"gfx/objects/woodbridge1.png")
template_footbridge(450,8,"gfx/objects/woodbridge1.png")
}
spritelayout spritelayout_woodbridge1 {
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_woodbridge1(LOAD_TEMP(1));
xoffset: 0; //from NE edge
yoffset: 0; //from NW edge
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
}
}
//set building sprite
switch (FEAT_OBJECTS, SELF, switch_woodbridge1_building, [
//store building sprite
STORE_TEMP(view == 1 ? 1 : (view == 2 ? 2 : (view == 3 ? 3 : 0)), 1)
]) {
spritelayout_woodbridge1;
}
item (FEAT_OBJECTS, woodbridge, 130) {
property {
class: "ROAD";
classname: string(STR_ROAD);
name: string(STR_woodbridge);
climates_available: ALL_CLIMATES;
size: [1,1];
build_cost_multiplier: 1;
remove_cost_multiplier: 10;
introduction_date: date(1800,1,1);
end_of_life_date: 0xFFFFFFFF;
object_flags: bitmask(OBJ_FLAG_NO_FOUNDATIONS, OBJ_FLAG_ALLOW_BRIDGE, OBJ_FLAG_ANIMATED, OBJ_FLAG_RANDOM_ANIMATION, OBJ_FLAG_ANYTHING_REMOVE, OBJ_FLAG_REMOVE_IS_INCOME);
height: 0;
num_views: 4;
}
graphics {
default: switch_woodbridge_building;
autoslope: return CB_RESULT_AUTOSLOPE;
}
}
Code: Select all
/* GRAVEL SLOPES */
# 79 "Auz_Roadside_Objects.pnml" 2
# 1 "src/objects/gravelslope1.pnml" 1
spriteset (spriteset_gravelslope1) {
template_building_slope(14,2,"gfx/objects/gravelslope1.png")
template_building_slope(89,2,"gfx/objects/gravelslope1.png")
template_building_slope(164,2,"gfx/objects/gravelslope1.png")
template_building_slope(239,2,"gfx/objects/gravelslope1.png")
}
spritelayout spritelayout_gravelslope1 {
ground {
// normal ground sprite - always draw
sprite: GROUNDSPRITE_NORMAL + slope_to_sprite_offset(nearby_tile_slope(0, 0));
}
building {
sprite: spriteset_gravelslope1(LOAD_TEMP(1));
xoffset: 0; //from NE edge
yoffset: 0; //from NW edge
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
}
}
//set building sprite
switch (FEAT_OBJECTS, SELF, switch_gravelslope1_building, [
//store building sprite
STORE_TEMP(view == 1 ? 1 : (view == 2 ? 2 : (view == 3 ? 3 : 0)), 1)
]) {
spritelayout_gravelslope1;
}
item (FEAT_OBJECTS, gravelslope1, 156) {
property {
class: "ROAD";
classname: string(STR_ROAD);
name: string(STR_gravelslope1);
climates_available: ALL_CLIMATES;
size: [1,1];
build_cost_multiplier: 1;
remove_cost_multiplier: 10;
introduction_date: date(1800,1,1);
end_of_life_date: 0xFFFFFFFF;
object_flags: bitmask(OBJ_FLAG_NO_FOUNDATIONS, OBJ_FLAG_ALLOW_BRIDGE, OBJ_FLAG_ANIMATED, OBJ_FLAG_RANDOM_ANIMATION, OBJ_FLAG_ANYTHING_REMOVE, OBJ_FLAG_REMOVE_IS_INCOME);
height: 0;
num_views: 4;
}
graphics {
default: switch_gravelslope1_building;
autoslope: return CB_RESULT_AUTOSLOPE;
}
}
Thanks ever so kindly