Решил обратиться к нашим скриптерам.
Можно ли реализовать привязку по точкам через скрипт? Если можно, то прошу желающих мне помочь данный скрипт своять обратиться ко мне в личку.
function Initialise()
Call("BeginUpdate");
end
local gbFirst = true
function Update ( p_nInterval )
if gbFirst then
Call("*:ActivateNode", "cablesA_coupled", 0 );
Call("*:ActivateNode", "cablesB_coupled", 0 );
Call("*:ActivateNode", "caps_open_240", 0 );
gbFirst = false
end
end
function Update(time)
IsEngineWithKey = Call ( "GetIsEngineWithKey" ) ~= 0;
if ( IsEngineWithKey ) then
if (Call( "*:GetControlValue", "PantographControl", 0 ) == 1) then
Call("*:AddTime", "panto", time * SpeedAnimPnt);
Call( "SendConsistMessage", PANTO_MSGID, 0, 1 );
else
Call("*:AddTime", "panto", -time * SpeedAnimPnt);
Call( "SendConsistMessage", PANTO_MSGID, 0, 0 );
end
end
end
function OnConsistMessage ( msg, argument, direction )
IsEngineWithKey = Call ( "GetIsEngineWithKey" ) ~= 0;
if (msg==PANTO_MSGID) then
Call( "*:SetControlValue", "PantographControl", 0, argument );
Call( "SendConsistMessage", msg, argument, direction );
else
Call( "SendConsistMessage", msg, argument, direction );
end
end
if (Call( "*:GetControlValue", "PantographControl", 0 ) == 1) then
Call("*:AddTime", "panto", time * SpeedAnimPnt);
Call( "SendConsistMessage", PANTO_MSGID, 0, 1 );
else
Call("*:AddTime", "panto", -time * SpeedAnimPnt);
Call( "SendConsistMessage", PANTO_MSGID, 0, 0 );
end
- Код: Выделить всё
IsEngineWithKey = Call ( "GetIsEngineWithKey" ) ~= 0;
Вернуться в [RW] Другие вопросы
Сейчас этот форум просматривают: Claude [Bot] и гости: 0