Jump to content

Wingthor

Members
  • Posts

    55
  • Joined

  • Last visited

About Wingthor

  • Birthday 03/31/1968

Personal Information

  • Flight Simulators
    DCS World
  • Location
    Oslo

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Indeed, it takes DCS UnitID as input. Strange why it not works with example code though: local UnitID = Unit.getByName("Teddy"):getID() Anyway good to know it was sorted out, glad it works.! Wingthor
  2. I have attached a test mission in initial message, which both tries the Moose function and example from hoggit. Mission starts with ICLS on, channel 1, you can turn ICLS off, but not get it back on with F10 radio menu triggered functions. Functions are called, but no ICLS on. Test mission has been tested with latest DCS version as per 2022-06-27, and even latest version of Moose. But Moose/Airboss is not the issue here. I have not tested with Airboss, since the function should also be used elsewhere. Would be nice @Nealius if you could take a quick test with the provided mission, to rule out if anything wrong with my or @Amarok_73system. This is the function which seems "dead": function ACtivateByHoggit() env.info("DEBUG: -------------------------------- Turning ICLS ON by Hoggit function --------------------------------") local gp = Group.getByName("CV59TF"):getController() gp:setCommand({id = "ActivateICLS", ["params"] = { ["type"] = 131584, ["channel"] = 5, ["unitId"] = 2, }, }) end
  3. In your mission script can you turn the ICLS on and off, and can you change channel?
  4. While debugging Moose command: CONTROLLABLE:CommandActivateICLS(Channel, UnitID, Callsign, Delay) it turns out that the bug seems to be dcs world it self. I have tested turning on ICLS with example code from the hoggit code: local gp = Group.getByName("CV59TF"):getController() gp:setCommand({id = "ActivateICLS", ["params"] = { ["type"] = 131584, ["channel"] = 5, ["unitId"] = 2, }, }) https://wiki.hoggitworld.com/view/DCS_command_activateICLS I have a test mission attached with both Moose and Scritping Engine command to test. Guess bug is related to other reports about th ICLS in this forum https://forum.dcs.world/search/?q=ICLS&quick=1&type=forums_topic&nodes=486 Regards... DEBUG_ICLS.miz
  5. Check out the Finite State Machine for Moose in SET_Groups documentaion. The OnAfterAdded is already implemented.
  6. Happens when its an AI kill due to if PlayerGroup:GetName() == playerGroup:GetName() then ... KillDataTable.target_name = EventData.TgtTypeName is never reached, and MESSAGE:New(KillDataTable.target_name.." destroyed",5):ToGroup(PlayerGroup) holds a nil value... But putting --show kill message if ES_Settings.PilotKillNotification == true then MESSAGE:New(KillDataTable.target_name.." destroyed",5):ToGroup(PlayerGroup) end inside the if PlayerGroup:GetName() == playerGroup:GetName() then clause seems to take away the error: So: function EasyStatsEnemyGroup:OnEventKill(EventData) BASE:I("------------ Extracted EVENTS.Kill---------------\n" .. PVPCrashHandler.TableSerialization(EventData)) KillDataTable = {} local PlayerUnit = EventData.IniUnit local PlayerGroup= EventData.IniGroup local TargetUnit = EventData.TgtDCSUnit if PlayerGroup:GetName() == playerGroup:GetName() then --data KillDataTable.player_name = playerName KillDataTable.player_module = PlayerUnit:GetTypeName()--player module used KillDataTable.player_coalition = EventData.IniCoalition if type(EventData.TgtTypeName) == "number" then KillDataTable.target_name = "Scenery Object" else KillDataTable.target_name = EventData.TgtTypeName end if KillDataTable.target_name == nil then KillDataTable.target_name = UNIT:FindByName(EventData.IniUnit.UnitName):GetTypeName() end KillDataTable.target_unit_name = EventData.TgtUnitName KillDataTable.target_coalition= EventData.TgtCoalition KillDataTable.timestamp = os.time(os.date("!*t")) EasyStats.LogKill(player_name,StatsFile,KillDataTable) --show kill message if ES_Settings.PilotKillNotification == true then MESSAGE:New(KillDataTable.target_name.." destroyed",5):ToGroup(PlayerGroup) end end end
  7. Just tested and version 1.2 works fine. However it seems not work when setting Skill "Client" and playing in a "Single Player" mission. Not sure if that is addressed before. I would like to propose a few enhancement: Report Carrier Landings. Night (or low visibility landings, instrument landings) Regards...
  8. Scripts functions: Spawning, AI tasks, Client Tasking, Cargo generating and more Script Tool: MOOSE. (Mission Object Oriented Scripting Environment) Reason: The object oriented approach Moose provides to mission scripting. Overide functions, inheritance and reuse of code. I can make rather sophisticated missions/sceneries with just few lines of code. Moose provides a huge API, which makes me able to do much with less code. Documentation written and Youtube vids Moose community provides help with code and sharing of code and such.
  9. You need to specify? Does the Moose spawn change unit names? or do you mean Groups name. When regular spawning and also with the ai-a2a-dispatcher Groups name have the original names from the mission editor plus a #number as a suffix If spawning with warehouse class name might change. You can have a look at this docs from Spawn class. Regards :) Wingthor
  10. Hi Mano, many things to fix here, First when grabbing object from Moose Wrapper (eg UNIT, GROUP, AIRBASE +++) classes you will use the FindByName(). For Unit that will be units name in Mission Editor (ME) So to grab carrier your call: carrier = UNIT:FindByName("Stennis")So now you have the carrier as a Wrapper.Unit#UNIT object which you can use. Next you have built a function which will be called from a menu object, fine. However you are using the GetPosition (with lower G which prob will return nothing) which will return a table with x,y,z values which is probably not what you want. However Moose provides a CLASS called point which is very handy. If you rather call for it coordinates, you can us carrierPos = carrier:GetCoordinate()Now when you look into docs for Core.Point, you see you have many option. the COORDINATE object which you now have can give you useful text, if you look at function starts with ToString (See). As I understand your issue, you want BRC text, and I assume that is Bearing, Range and Course, from the user. So when generating a text like that you need to know the players location as well. However, I will not go into that now. So since this is called colation wide, it makes more sense to give position in BULLS with carrierPos = carrier:GetCoordinate():ToStringBULLS(coalition.side.BLUE), which returns a string. So get carriers heading in string format arrierHeading = string.format ("Heading: %i", carrier:GetHeading())Concatenate the two string to something like Message = carrierPos .. " " .. carrierHeading And now you have a string you can wrap into a message like posMessage = MESSAGE:New(Message,25,nil,true):ToAll()You can try this as code, and see if that gets your further: carrier = UNIT:FindByName("Stennis") local function getCarrierPosition() local carrierPos = carrier:GetCoordinate():ToStringBULLS(coalition.side.BLUE) local carrierHeading = string.format ("Heading: %i", carrier:GetHeading()) local Message = carrierPos .. " " .. carrierHeading posMessage = MESSAGE:New(Message,25,nil,true):ToAll() end MenuTop = MENU_COALITION:New( coalition.side.BLUE, "Stennis" ) MenuPosition = MENU_COALITION_COMMAND:New( coalition.side.BLUE, "Position", MenuTop,getCarrierPosition)But again if you want Bearing and Range stuff you need to grab players location, then perhaps better use MENU_GROUP and send group (sender) as argument to function. Then you can calculate BRC text. Hope this help. I have NOT TESTED the code though. Also plz join our Discord channel for further help Regards Wingthor
  11. Hi Viper39, thanks for a great tool. I have had for a while but have started to look deeper into your application. Hope I can provide some useful feedback's. Bug: Kneeboard: After choosing "metrics" as readout, and choose BE as readout in "note" column. The distance seems to be in "nautical miles". Kneeboard blanks manually added fields, when updated. Feature request: Export of flights only, so you can share your flight plan into an overall plan. Export knee-boards by packages. So each package is in one separate directory, you easy can send to rest of the flight. Add reference like "Magic/GSI, Agents" freq/calsign etc or other global notes, which goes into all flights knee-board. Also global threats. Regards :)
  12. There is plenty of YT vids with examples how to use, Here :) Regards Wingthor
  13. Hi Ciribob, I am currently working with function which is called from CTLD (Latest from github) callback function. I have tested in both single player and multiplayer and I seems not to receive any inforantion about user in args table? I can see only information about AI group involved. Regards Wingthor
  14. Here is a log file where only the latest connected player gets a file. dcs.zip
×
×
  • Create New...