Hi everyone,
is there a way to add animation only to one precise model (with a name) in an object with more than one model?
Or,
does error message, received in console for not founding a model for animation, affect somehow (maybe appearing while player is playing) the exported dungeon?
TY
[SOLVED] animation to a single model in 2 models objects
[SOLVED] animation to a single model in 2 models objects
Last edited by Granamir on Fri May 22, 2015 8:06 pm, edited 1 time in total.
Re: animatio to a single model in 2 models objects
An AnimationComponent affects only one model. By default it will be the component named "model", but you can change it with AnimationComponent's model field.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: animatio to a single model in 2 models objects
Ty minmay, solved giving name "model" only to model i need.
Btw for better understanding of this component, initially i gave 2 names to my 2 models, and animation tryed to apply to both, to the right one it applyed and plyed, to the wrong one sent me am error message in console.
I looked in animation component https://github.com/JKos/log2doc/wiki/Co ... -component but found nothing. Can u tell me where can i find what i would need?
TY
Btw for better understanding of this component, initially i gave 2 names to my 2 models, and animation tryed to apply to both, to the right one it applyed and plyed, to the wrong one sent me am error message in console.
I looked in animation component https://github.com/JKos/log2doc/wiki/Co ... -component but found nothing. Can u tell me where can i find what i would need?
TY
Re: [SOLVED] animation to a single model in 2 models objects
I already told you. AnimationComponent has a "model" field for choosing which model to apply the animations to. Example:
Code: Select all
defineObject{
name = "forest_pit_trapdoor",
baseObject = "base_pit_trapdoor",
components = {
{
class = "Model",
model = "assets/models/env/forest_pit.fbx",
dissolveStart = 4,
dissolveEnd = 6,
staticShadow = true,
},
{
class = "Model",
name = "trapDoorModel",
model = "assets/models/env/mine_pit_trapdoor.fbx",
},
{
class = "Animation",
model = "trapDoorModel",
animations = {
open = "assets/animations/env/mine_pit_trapdoor_open.fbx",
close = "assets/animations/env/mine_pit_trapdoor_close.fbx",
},
},
},
}Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.