Hello.
Let me apologize first that I start this topic in English language, but my German knowledge is a bit rusty.
I have made an adjustable animated bale forks for my private use, but my knowledge of .lua is not so good.
I wanna modify the AnimationHandler.lua and the objectAttacherMBH.lua @author Geri-G (edited by PeterJ FS-UK modteam), found can be in this package: http://fs-uk.com/forum/index.php?topic=130148.0.
The problem with the script is that I do not know how to detach the bale as soon as the animation of the forks is started ... so to be more precise ... if the bale is locked on to forks and the animation is set still then the bale stays locked ... as soon the forks are started to move apart or towards each other the bale must be unlocked.
I am pretty sure that it must be done in objectAttacherMBH.lua in this part here:
[lua]if self:getIsActive() and self.isServer then
if self.animationParts[1].currentPosition > 1001 then
if self.isBaleAttach == true then
self:setIsBaleAttached(not self.isBaleAttach);
end;
end;
if self.animationParts[1].currentPosition < 1001 then
if self.isBaleAttach == false then
self:setIsBaleAttached(not self.isBaleAttach);
end;
end;
end;[/lua]
but like I have said Im not much of a scripter. Would appreciate if anyone could help me with this script.
This will be for my personal use only.