Hey Leute,
ich schreibe mir gerade ein Script um per lua eine Animation abzuspielen, soweit so gut, aber ich will mal fragen ob das auch passt...
[lua]AnimatedPart = {};
function AnimatedPart.prerequisitesPresent(specializations)
return true;
end;
function AnimatedPart:load(xmlFile)
self.Animation = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.AnimPart#index"));
self.AnimatedPartState = false;
end;
function AnimatedPart:delete()
end;
function AnimatedPart:mouseEvent(posX, posY, isDown, isUp, button)
end;
function AnimatedPart:keyEvent(unicode, sym, modifier, isDown)
end;
function AnimatedPart:update(dt)
if self:getIsActiveForInput() then
if InputBinding.hasEvent(InputBinding.Hub) then
self.animationName = "hydraulika_opuszczanie";
self:playAnimation(self.animationName, 1, nil, true)
end;
end;
end;
function AnimatedPart:updateTick(dt)
end;
function AnimatedPart:draw()
end;
[/lua]
MfG