Crows don't fly?

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
Dewalrus
Posts: 20
Joined: Thu Feb 19, 2015 11:35 pm

Crows don't fly?

Post by Dewalrus »

I've placed a number of ambient creatures and all the others work fine, but some of the crows just hang in the air without moving. They sometimes fly for a short distance, but then stop again. I've got them all set to elevation 2 or 3. What's causing this?
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Crows don't fly?

Post by Drakkan »

probably because of performance, you can set distance on which the animation will be "triggered", you can modify it as you wish. Also in real life, if some small object is far away on horizon, you can see it as staying on one place, but it is moving in reality :)

defineObject{
name = "crows_flying",
baseObject = "base_floor_decoration",
components = {
{
class = "Model",
model = "assets/models/monsters/crow.fbx",
castShadow = true,
--dissolveStart = 2,
--dissolveEnd = 4,
},
{
class = "Animation",
animations = {
sway = "assets/animations/monsters/crow/crow_circle_fly.fbx",
},
playOnInit = "sway",
loop = true,
maxUpdateDistance = 10,
},

},
editorIcon = 252,
}
edit:
also some other interesting animation hooks you can try use


AnimationComponent:getCurrentLevelOnly() Get whether animation component is updated only when party is on the same level
AnimationComponent:getLoop() Get looping for initial animation
AnimationComponent:getMaxUpdateDistance() Get max update distance in squares
AnimationComponent:getPlayOnInit() Get name of the initial animation to be played when the object is spawned
AnimationComponent:setCurrentLevelOnly(boolean) Set whether animation component is updated only when party is on the same level
AnimationComponent:setLoop(boolean) Set looping for initial animation
AnimationComponent:setMaxUpdateDistance(number) Set max update distance in squares
AnimationComponent:setPlayOnInit(string) Set name of the initial animation to be played when the object is spawned
AnimationComponent:stop()
AnimationComponent.onAnimationEvent(self, event)
Breath from the unpromising waters.
Eye of the Atlantis
Dewalrus
Posts: 20
Joined: Thu Feb 19, 2015 11:35 pm

Re: Crows don't fly?

Post by Dewalrus »

Thanks mate :)
Post Reply