Hi,
ich will mir die Werte der DigitalInputAxis im Hilfefenster ausgeben lassen.
Nur mal testweise, und damit ich weiß in welchem Wertebereich die arbeiten. Interessiert mich, da ich dies für ein Script brauche.
Hab jetzt folgendes:
[lua]AxisWert = {};
function AxisWert.prerequisitesPresent(specializations)
return SpecializationUtil.hasSpecialization(Motorized, specializations);
end;
function AxisWert:load(xmlFile)
self.axisForward = 0;
self.axisForwardHand = 0;
end;
function AxisWert:delete()
end;
function AxisWert:mouseEvent(posX, posY, isDown, isUp, button)
end;
function AxisWert:keyEvent(unicode, sym, modifier, isDown)
end;
function AxisWert:update(dt)
if self.isEntered then
if self:getIsActiveForInput() then
self.axisForward = InputBinding.getDigitalInputAxis(InputBinding.AXIS_MOVE_FORWARD_VEHICLE);
self.axisForwardHand = InputBinding.getDigitalInputAxis(InputBinding.AXIS_MOVE_FORWARD_PLAYER);
end;
end;
end;
function AxisWert:draw()
g_currentMission:addHelpButtonText(g_i18n:getText("Axis"), self.axisForward);
g_currentMission:addHelpButtonText(g_i18n:getText("AxisHand"), self.axisForwardHand);
end;
Steerable.load = Utils.appendedFunction(Steerable.load, AxisWert.load);
Steerable.update = Utils.appendedFunction(Steerable.update, AxisWert.update);
Steerable.draw = Utils.appendedFunction(Steerable.draw, AxisWert.draw);[/lua]
bekomme aber Ingame folgenden Fehler:
pAre