Re: [Scripts,Assets] Small interesting additions
Posted: Tue Jan 06, 2015 2:09 am
These are really quite nice additions Davey! Thanks for sharing with us, I am sure to use some of these. Hope to see more from you!
Official Legend of Grimrock Forums
http://grimrock.net/forum/
Code: Select all
local anims = {
idle = "assets/animations/monsters/goromorg/goromorg_idle.fbx",
moveForward = "assets/animations/monsters/goromorg/goromorg_walk.fbx",
strafeLeft = "assets/animations/monsters/goromorg/goromorg_strafe_left.fbx",
strafeRight = "assets/animations/monsters/goromorg/goromorg_strafe_right.fbx",
turnLeft = "assets/animations/monsters/goromorg/goromorg_turn_left.fbx",
turnRight = "assets/animations/monsters/goromorg/goromorg_turn_right.fbx",
attack = "assets/animations/monsters/goromorg/goromorg_attack.fbx",
getHitFrontLeft = "assets/animations/monsters/goromorg/goromorg_get_hit_front_left.fbx",
getHitFrontRight = "assets/animations/monsters/goromorg/goromorg_get_hit_front_right.fbx",
getHitBack = "assets/animations/monsters/goromorg/goromorg_get_hit_back.fbx",
getHitLeft = "assets/animations/monsters/goromorg/goromorg_get_hit_left.fbx",
getHitRight = "assets/animations/monsters/goromorg/goromorg_get_hit_right.fbx",
fall = "assets/animations/monsters/goromorg/goromorg_get_hit.fbx",
}
for name,anim in pairs(anims) do
defineAnimationEvent{
animation = anim,
event = "hack",
normalizedTime = 0,
}
end
defineObject{
name = "poop_goromorg",
baseObject = "goromorg",
components = {
{
class = "Model",
model = "assets/models/monsters/goromorg.fbx",
storeSourceData = true,
material = "poop",
},
{
class = "Animation",
animations = anims,
currentLevelOnly = true,
onAnimationEvent = function(self, event) if event == "hack" and not self.go.frozen then self.go.model:setMaterial(self.go.model:getMaterial()) end end,
},
},
}
Code: Select all
onAnimationEvent = function(self, event) if event == "hack" and not self.go.frozen then self.go.model:setMaterialOverrides(self.go.model:getMaterialOverrides()) end end
Code: Select all
for name,anim in pairs(anims) do
defineAnimationEvent{
animation = anim,
event = "hack",
normalizedTime = 0,
}
defineAnimationEvent{
animation = anim,
event = "hack",
normalizedTime = 0.5,
}
end
Code: Select all
{ class = "Timer",
timerInterval = 0.001,
triggerOnStart = true,
onActivate = function(self) if not self.go.frozen then self.go.model:setMaterial(self.go.model:getMaterial()) end end,
},
The future of retro-gamingminmay wrote:people running the game at 2000 FPS.