Schönen Sonntagnachmittag euch...
Weis jemand von euch was sich zu LS 11 an den Scripten für die Trigger einer Map verändert hat?
Keines meiner LS 09 Scipte (Tore, Getreiderohrtrigger uws.) läuft im 11er, weder wenn ich es so als Zip einfüge, noch wenn ichs in die Moddesc der Map mit reinschreibe.
Die Log sagt auch Qasi garnix.
Mal ne Tor LUA ausm 09er als Beispiel...
[lua]
DoorBigEventListener = {};
_G.DoorBigonCreate= function(id)
DoorBigEventListener:load(id)
print("Map: DoorBigTrigger loaded");
end;
function DoorBigEventListener:loadMap(name)
end;
function DoorBigEventListener:draw()
end;
function DoorBigEventListener:mouseEvent(posX, posY, isDown, isUp, button)
end;
function DoorBigEventListener:keyEvent(unicode, sym, modifier, isDown)
end;
function DoorBigEventListener:load(id)
self.triggerId = id;
addTrigger(id, "triggerCallback", self);
self.deleteListenerId = addDeleteListener(id, "delete", self);
self.openDoors = false;
self.fInTrigger = false;
self.doorOne = getChildAt(id, 0);
self.doorTwo = getChildAt(id, 1);
self.RotD1 = Utils.degToRad(0);
self.maxRotD1 = Utils.degToRad(-100);
self.minRotD1 = Utils.degToRad(0);
self.RotD2 = Utils.degToRad(0);
self.maxRotD2 = Utils.degToRad(100);
self.minRotD2 = Utils.degToRad(0);
end;
function DoorBigEventListener:deleteMap()
removeTrigger(self.triggerId);
removeDeleteListener(self.triggerId, self.deleteListenerId);
end;
function DoorBigEventListener:update(dt)
if self.openDoors == true then
if self.RotD1 > self.maxRotD1 then
self.RotD1 = self.RotD1 - dt*0.0003;
end;
if self.RotD2 < self.maxRotD2 then
self.RotD2 = self.RotD2 + dt*0.0003;
end;
else
if self.RotD1 < self.minRotD1 then
self.RotD1 = self.RotD1 + dt*0.0003;
end;
if self.RotD2 > self.minRotD2 then
self.RotD2 = self.RotD2 - dt*0.0003;
end;
end;
setRotation(self.doorOne, 0, self.RotD1, 0);
setRotation(self.doorTwo, 0, self.RotD2, 0);
if self.fInTrigger == true then
g_currentMission:addExtraPrintText("Taste Numpad 0 Tore Auf/Zu");
if InputBinding.hasEvent(InputBinding.ToggleDoors) then
self.openDoors = not self.openDoors
end;
end;
end;
function DoorBigEventListener:triggerCallback(triggerId, otherId, onEnter, onLeave, onStay)
if onEnter then
self.fInTrigger = true;
elseif onLeave then
self.fInTrigger = false;
end;
end;
addModEventListener(DoorBigEventListener);[/lua]
hat jemand n Tipp oder sowas für mich?
Danke schonmal...
lg