Category | Scripting |
Created | 11.11.2016 16:09 |
Bio Medical Extetion (Unknown) | 11.11.2016 16:10 |
---|---|
Hallo, i need to know what is the vehicle type name and specialization name of the Locomotive (the train). my script: for k, v in pairs(VehicleTypeUtil.vehicleTypes) do if v ~= nil then print(('\tadding to %q'):format(tostring(v.name))); end; end; log output: adding to "fuelTrailer" adding to "selfPropelledSprayer" adding to "cutter_animated" adding to "mower_animated" adding to "forwarderTrailer" adding to "tractor" adding to "sprayer_animated" adding to "car_dynamicMountAttacher" adding to "woodCrusherTrailer" adding to "cutter_builtInCutterTrailer" adding to "forwarderTrailer_steerable" adding to "implement" adding to "combine_animated" adding to "loaderVehicle" adding to "treePlanter" adding to "strawBlower" adding to "sowingMachine" adding to "receivingHopper" adding to "leveler" adding to "plough" adding to "cutter" adding to "hookLiftContainerTransport" adding to "weederSowingmachine" adding to "wheelLoader" adding to "conveyorTrailerDrivable" adding to "selfPropelledMixerWagon" adding to "manureBarrel" adding to "woodHarvester" adding to "baleLoader" adding to "skidSteer" adding to "manureSpreader" adding to "attachableFrontloader" adding to "baleWrapper" adding to "combine_animated_crawler" adding to "augerWagon" adding to "shovel_animated" adding to "trailer" adding to "hookLiftContainerManureBarrel" adding to "goldhoferFront" adding to "dynamicMountAttacherImplement" adding to "baler" adding to "mower" adding to "tractor_articulatedAxis" adding to "shovel" adding to "car" adding to "mixerWagon" adding to "ridingMower" adding to "woodCrusherTrailerDrivable" adding to "conveyorTrailerHireable" adding to "tractor_crawler" adding to "selfPropelledMower" adding to "hookLiftTrailer" adding to "weeder" adding to "stumpCutter" adding to "waterTrailer" adding to "treeSaw_attacherJointControl" adding to "treeSaw" adding to "livestockTrailer" adding to "combine_animated_articulatedAxis" adding to "transportTrailer" adding to "tractor_foldable" adding to "windrower" adding to "loadingTrailerDrivable" adding to "tedder" adding to "roller" adding to "baleGrab" adding to "hookLiftContainerManureSpreader" adding to "attachableCombine" adding to "combine" adding to "selfPropelledPotatoHarvester" adding to "implement_animated" adding to "cultivator" adding to "shovel_dynamicMountAttacher" adding to "telehandler_articulatedAxis" adding to "telehandler" adding to "defoliater_cutter_animated" adding to "hookLiftContainerTrailer" adding to "forageWagon" adding to "defoliator_animated" adding to "forwarder" adding to "conveyorTrailerSteerable" adding to "hookLiftContainer" adding to "sowingMachineSprayer" adding to "dynamicMountAttacherTrailer" adding to "combine_cylindered" adding to "tractor_reverseDriving" adding to "manureBarrelCultivator" but i cant find the "locomotive" .... pls help thx |
Bio Medical Extetion (Unknown) | 12.11.2016 17:29 |
---|---|
bump..... |
Bio Medical Extetion (Unknown) | 14.11.2016 20:38 |
---|---|
I try to explain better my problem: My mod have 4 files: modDesc.xml register.lua mymod.lua store.dds register.lua script: function mymod_Register:loadMap(name) if self.mymod_Register == nil then self.mymod_Register = false; for k, v in pairs(VehicleTypeUtil.vehicleTypes) do if v ~= nil then for i = 1, table.maxn(v.specializations) do local vs = v.specializations[i]; if vs ~= nil and vs == SpecializationUtil.getSpecialization("drivable") then-- table.insert(v.specializations, SpecializationUtil.getSpecialization("mymod")); vs.turnAutoOn = g_i18n:getText("turnAutoOn"); vs.turnAutoOff = g_i18n:getText("turnAutoOff"); end; end; end; end; end; end; mymod.lua script: function mymod:update(dt) if InputBinding.hasEvent(InputBinding.Autopilot_OnOff) then self.myflag = not self.myflag; end; end; function mymod:draw() if not self.myflag then g_currentMission:addHelpButtonText(Drivable.turnAutoOn, InputBinding.mymod_OnOff,nil,GS_PRIO_LOW); else g_currentMission:addHelpButtonText(Drivable.turnAutoOff, InputBinding.mymod_OnOff,nil,GS_PRIO_LOW); end; end; Now THIS works with ALL "drivable" vehicles but NOT for the TRAIN or LOCOMOTIVE... WHY? pls hlp |
Duke Leto (Unknown) | 15.11.2016 23:59 |
---|---|
I don't think a train is classified as a vehicle, if you look at the documentation Train is under Objects classification, not vehicles or vehicle specializations. |
Note: Log in to post. Create a new account here.