Object lua
Code: Select all
defineObject{
name = "dark_healing_crystal",
components = {
{
class = "Model",
model = "mod_assets/models/env/dark_healing_crystal.fbx",
castShadow = false,
},
{
class = "Particle",
particleSystem = "crystal",
},
{
class = "Light",
offset = vec(1,0,0),
color = vec(1/255, 1/255, 255/255),
range = 7,
shadowMapSize = 128,
castShadow = true,
staticShadows = true,
},
{
class = "Sound",
offset = vec(0, 1.5, 0),
sound = "crystal_ambient",
},
{
class = "Animation",
animations = {
spin = "assets/animations/env/healing_crystal_spin.fbx",
},
},
{
class = "Clickable",
offset = vec(0, 1.5, 0),
size = vec(1.6, 2, 1.6),
maxDistance = 1,
},
{
class = "Obstacle",
},
{
class = "ProjectileCollider",
},
{
class = "Crystal",
cooldown = 480,
},
},
placement = "floor",
editorIcon = 60,
automapIcon = 104,
automapIconLayer = 1,
}
Code: Select all
defineMaterial{
name = "dark_healing_crystal",
diffuseMap = "mod_assets/textures/env/dark_healing_crystal_dif.tga",
specularMap = "assets/textures/env/healing_crystal_dif.tga",
normalMap = "mod_assets/textures/env/dark_healing_crystal_normal.tga",
doubleSided = false,
lighting = true,
ambientOcclusion = false,
alphaTest = false,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 20,
depthBias = 0,
-- custom shader
shader = "crystal",
shadeTex = "mod_assets/textures/env/dark_healing_crystal_shadetex.tga",
shadeTexAngle = 0,
crystalIntensity = 3,
onUpdate = function(self, time)
self:setParam("shadeTexAngle", time*0.8)
end,
}
*Edit* I have been successful in recoloring the ice lizard. The crystal however still won't work.