Game Development Community

Playing IFL animation on mission startup

by Krzysztof Szaton · in Artist Corner · 02/13/2009 (5:01 am) · 4 replies

Hello.

I have problem with model and ifl amimation. Model is a track arrow(in race game). I create model, ifl texture, make animation, create datablock. When I add this model to mission animation plays perfect. When I close game and open mission once more- models animation is not playing. This is my datablock:

datablock StaticShapeData(TrackArrow) {
category = "Track Arrows";
shapeFile = "~/data/model/common/arrows/arrow_right.dts";
};

function TrackArrow::onAdd(%this,%obj) {
%obj.playthread(0, "arrowlight");
}

function StaticShapeData::create(%block)
{

%obj = new StaticShape()
{
dataBlock = %block;
};
return(%obj);
}

Maybe I should overwrite another method(not onAdd)?

Thank you for help,
Chris.

#1
02/13/2009 (4:52 pm)
Your script is correct. Nothing needs changing there.
Where are you exec'ing it in the lineup in game.cs?
You can try moving it up earlier in the exec process and see if that works.
#2
02/15/2009 (7:54 am)
Thank you for reply. I moved my exec to another parts of game.cs but no success. I think that LD puts arrows(using StaticShape model) before i make datablock. Is there any way to change those static shapes to shapes?
#3
02/15/2009 (9:26 am)
I don't understand why this isn't working for you. Mine all work perfectly.
Which engine are you using?
#4
02/15/2009 (9:56 am)
TGEA 1.7.1

New models added to mission works but older(added before i make datablock) don't have animation. I will try solve this problem and write when i find answer.

EDIT:
I finded answer( i think). LD puts models before i maked datablock for this model so all objects are creating by StaticShape function(not Shape). This is my theory.

btw:
IFL animations stops when i look at the model from acute angle.