Code: Select all
defineObject{
name = "forest_oak_cluster_color",
baseObject = "base_obstacle",
components = {
{
class = "Model",
model = "assets/models/env/forest_oak_cluster.fbx",
material = "forest_oak_cluster",
dissolveStart = 2,
dissolveEnd = 5,
shadowLod = 1,
staticShadow = true,
--debugDraw = true,
-- bounding box fix: automatically computed bounding box is too small because the model is built incorrectly
-- (without skinning all the trees in the cluster are in one place)
boundBox = { pos = vec(0, 5, 0), size = vec(8, 10, 8) },
},
{
class = "Animation",
animations = {
sway = "assets/animations/env/forest_oak_cluster_idle.fbx",
},
playOnInit = "sway",
loop = true,
maxUpdateDistance = 5,
},
},
editorIcon = 168,
automapTile = "trees",
minimalSaveState = false,
}
Code: Select all
defineObject{
name = "touch_up_trigger",
baseObject = "base_floor_decoration",
minimalSaveState = true,
components = {
{
class = "Null",
onInit = function(self)
if touch_ups and touch_ups.script and touch_ups.script.touchUps
then touch_ups.script:touchUps() end end,
}
}
}
Code: Select all
-- set id to touch_ups
function touchUps()
--volatile changes
forest_oak_cluster_1.model:setEmissiveColor(vec(-.025))
forest_oak_cluster_2.model:setEmissiveColor(vec(-.01,-.005,-.05))
forest_oak_cluster_3.model:setEmissiveColor(vec(0,0,-.01))
forest_oak_cluster_4.model:setEmissiveColor(vec(-.025,-.01))
forest_oak_cluster_5.model:setEmissiveColor(vec(-.01,-.025,-.06))
end