Jump to content

Wizxrd

ED Closed Beta Testers Team
  • Posts

    93
  • Joined

  • Last visited

Everything posted by Wizxrd

  1. You can use :NewWithAlias() to be able to name the group to appear as whatever you want in game. If you need to find the group after it’s been spawned you can reference this: https://forums.eagle.ru/topic/278457-help-with-groupfindbyname/?do=findComment&comment=4737312
  2. Ah I see what you’re doing now, yeah might just not be possible for MP.
  3. Have you tried setting player slots to Client for MP and slots to Player for SP? It does say here https://wiki.hoggitworld.com/view/DCS_event_player_enter_unit that it should trigger for player/client slots so not sure… Your code does look okay though for handling the event though.
  4. You can setup your Intelisense through Visual Studio Code or LDT How to setup Intelisense for Visual Studio Code: https://forums.eagle.ru/topic/227443-moose-visual-studio-code-moose-implementation/ How to setup Intelisense with LDT: Hopefully these two guides help some, personally I use Visual Studio Code as it’s more appealing to look at for long hours
  5. To end the mission it could be as simple as this: TRIGGER: ONCE -> CONDITION: TIME MORE(x) -> ACTION: END MISSION To have an F10 radio command to load a new mission you could do this: TRIGGER: MISSION START -> CONDITION: None -> ACTION: RADIO ITEM ADD FOR COALITION 1) select the coalition 2) give a unique name like “Load Mission (name)” 3) set a flag ie: 1 4 set flag value ie: 1 TRIGGER: ONCE -> CONDITION: FLAG EQUALS(1,1) (same flag,value as the above radio command) -> ACTION: LOAD MISSION (select your mission) Should be as simple as that, if there are any issues you run into feel free to post back here!
  6. Well it could just be based on the closing velocity, altitude and aspect of the target it’s tracking. That would just be my first guess, I’m not around to test but you could try increasing the speed and altitude of the AJS37 to try and get the most of the SM-2. Otherwise I think the range of them looked to be alright.
  7. Attached is an example mission of a Ticonderoga with no advanced waypoint actions, it will defend itself with RIM-66's (SM-2) against an attacking AJS37 with RB-15's. This link also might be helpful: https://en.wikipedia.org/wiki/Standard_Missile rim66_sm2.miz
  8. Alright sorry about the long wait, took a bit to figure out what was going on but here's what I've come up with: ClientSpawnHandler = {} function ClientSpawnHandler:onEvent(event) if world.event.S_EVENT_BIRTH == event.id and (event.initiator:getName():find('CAS')) then local client = event.initiator local client_Name = event.initiator:getName() local client_Country = event.initiator:getCountry() local client_position = event.initiator:getPosition().p local client_heading = mist.getHeading(client) local back_heading = Get_Back_Bearing(client_heading) local back_heading_rad = back_heading * math.pi / 180 -- radians local Offset_SpawnCoord = { x = (client_position.x + 19), y = 0, z = (client_position.z - 6) } local Offset_SpawnCoord_Ext = { x = (client_position.x + 18), y = 0, z = (client_position.z - 6) } local M4_Group_Category = Group.Category.GROUND local M4_Group_Template = { ["visible"] = false, ["taskSelected"] = true, ["route"] = { }, -- end of ["route"] --["groupId"] = 1, ["tasks"] = { }, -- end of ["tasks"] ["hidden"] = false, ["units"] = { [1] = { ["type"] = "LAV-25", ["transportable"] = { ["randomTransportable"] = false, }, -- end of ["transportable"] --["unitId"] = 2, ["skill"] = "Average", ["y"] = Offset_SpawnCoord.z, ["x"] = Offset_SpawnCoord.x, ["name"] = "_chief", ["playerCanDrive"] = false, ["heading"] = back_heading_rad, -- It must be given in radians! }, -- end of [1] [2] = { ["type"] = "LAV-25", ["transportable"] = { ["randomTransportable"] = false, }, -- end of ["transportable"] --["unitId"] = 2, ["skill"] = "Average", ["y"] = Offset_SpawnCoord_Ext.z, ["x"] = Offset_SpawnCoord_Ext.x, ["name"] = "_chief_ext", ["playerCanDrive"] = false, ["heading"] = back_heading_rad, -- It must be given in radians! }, -- end of [2] }, -- end of ["units"] ["y"] = Offset_SpawnCoord.z, ["x"] = Offset_SpawnCoord.x, ["start_time"] = 0, ["task"] = "Ground Nothing", } -- end of [1] M4_Group_Template.name = client_Name.."_chief_group" coalition.addGroup(client_Country, M4_Group_Category, M4_Group_Template) local spawned_group_units = Group.getByName(M4_Group_Template.name):getUnits() for _, data in pairs(spawned_group_units) do if whatever then Unit.getByName(data:getName()):destroy() trigger.action.outText(data:getName().." destroyed", 15) end end end end A few things to note: 1) I've changed the structure a little bit to match what's being given as an example for addGroup() on the SSE wiki for easier reference. 2) You need to use Group.Category instead of Unit.Category 3) For whatever reason unknown to me, the stack overflow error comes from concatenating client_Name for the units name. 4) Adding to 3, the group name CAN be concatenated with client_Name, again I have no idea why. 5) You can change the unit type back to what you were using as I don't have the mod for them. I've included an example way at the bottom of how you could destroy the units after if you wanted to, I didn't dive into that though since the main problem was getting them spawned. Hopefully this might help some!
  9. Try using :getPosition().p or :getPoint(), just tried and seems to work ok. Let me know if either of those do it for you!
  10. Something could be wrong with the template you're using. I've directly copied a group I created via the ME and it seems to be following the route without facing a different direction. Try this example template and let me know if it fixes your issue Edit again: Weird things happen if you try and change the point to anything other than what you've copied over. My suggestion is to create a template in the ME of your tanker group with all points and tasks you want. Save your mission, make a copy of it and change .miz to .zip. Open the .zip and open the mission file that's inside( just named "mission" ). You'll be able to copy and paste the entire group table over and it should work everytime. KC135_Table_Spawn.lua
  11. Your first waypoint is east of the spawn point, so it automatically starts off facing east to fly towards it. I'm pretty sure that will just override what you set for the heading in units. Edit: after a few other various tests, it seems it spawns in every time at heading 080. Interesting
  12. Reproduced with track hud_symbols.trk
  13. If you want to access your group after you've spawned it, you can use :OnSpawnGroup(). Here's just a short example: f16_spawn = SPAWN :New("F_16_USA") :OnSpawnGroup( function(SpawnedGroup) F16GroupName = SpawnedGroup.GroupName end ) Then later on to find it you can use it like this: GROUP:FindByName(F16GroupName) Feel free to ask any questions you may have, hope this helps!
  14. Adding to this (yes it does work btw, I've tested for you ), if you wanted to destroy the group as a whole it could be flattened to this: local Units = GROUP:FindByName(BFM1GroupName):GetUnits() for id, data in pairs(Units) do Unit.getByName(data:GetName()):destroy() end But as danger mentioned this would be for if you just wanted to remove the group with no visuals
  15. You can use :OnSpawnGroup() which would look something like this: Spawn_BFM1 = SPAWN :New( "Spawn BFM1" ) :InitLimit(2, 2) :InitRandomizeZones( AirZoneTable ) :InitRandomizeTemplate(AirTemplateTable) :SpawnScheduled( 1, 0 ) :OnSpawnGroup( function( SpawnGroup ) BFM1GroupName = SpawnGroup.GroupName end ) :Spawn() Then to destroy them individually you just need to use :GetUnit(UnitNumber) and use :Destroy() on that same variable. BFM1Unit1 = GROUP:FindByName(BFM1GroupName):GetUnit(1) BFM1Unit1:Destroy() BFM1Unit2 = GROUP:FindByName(BFM1GroupName):GetUnit(2) BFM1Unit2:Destroy() If you have any questions feel free to ask, I hope this helps some!
  16. I've hid my original post as mist.getPayload() only works for payloads created in the ME loadout and no "live" data can be gathered, My apologies. I also have never tried doing this before but would like to see something come of it as it would be something cool to see. I'll try working on something and see what I can come up with to help out. Thanks for the pointers cfrag.
  17. Your log shows this error: 2021-07-24 18:55:57.475 ALERT LUACOMMON: Error: GUI Error: [string "./dxgui/bind/SpinBox.lua"]:37: Invalid arguments! GUI debug.traceback: stack traceback: [C]: ? [C]: in function 'SpinBoxSetValue' [string "./dxgui/bind/SpinBox.lua"]:37: in function 'setValue' [string "./MissionEditor/modules/me_payload.lua"]:455: in function 'updateData' [string "./MissionEditor/modules/me_payload.lua"]:528: in function 'update' [string "./MissionEditor/modules/me_payload.lua"]:351: in function 'show' [string "./MissionEditor/modules/me_tabs.lua"]:203: in function 'onShow' [string "./dxgui/bind/TabGroupItem.lua"]:20: in function 'callback' [string "./dxgui/bind/Widget.lua"]:368: in function <[string "./dxgui/bind/Widget.lua"]:363> 2021-07-24 18:56:03.150 WARNING LOG: 1 duplicate message(s) skipped. 2021-07-24 18:56:03.150 ERROR DX11BACKEND: Can't find precompiled shader bazar/shaders/missioneditor/guishowmsg.fx:DIRECTX11=true;USE_DCS_DEFERRED=1;. 2021-07-24 18:56:03.150 INFO DX11BACKEND: Compile shader: bazar/shaders/missioneditor/guishowmsg.fx:DIRECTX11=true;USE_DCS_DEFERRED=1; 2021-07-24 18:56:03.153 ALERT DX11BACKEND: Error: Can't find precompiled shader for effect bazar/shaders/missioneditor/guishowmsg.fx:DIRECTX11=true;USE_DCS_DEFERRED=1;. After a few tests here's what you need to do: 1) close DCS and run a repair 2) open your mission and delete that group without opening the loadout menu for it 3) create a new F-14B group with the CAP task Let me know if this fixes your issue!
  18. Ah yes that's the place, you can actually create your own config if you'd like, here's what mine looks like for a 3440x1440 main monitor, exporting to a 1920x1080 second monitor. I've just named it DisplaySetup.lua and placed it in that folder. You can select this once in the system options menu in game, select the drop down for monitors and if you've placed your file in that folder it will appear in there. May or may not have to also adjust your resolution too.
  19. From memory it should be located here: C:\Users\Your Username\Saved Games\DCS\Config\MonitorSetup
  20. I think your problem lies in having your tankers set to follow another group. You can still keep them close together with waypoints but here's what I would suggest for the configuration of each task and its waypoint: waypoint 0 (spawn) 1. Tanker -a (if you do not see this, reselect the refueling task from the airplane group menu) 2. Activate TACAN (if usable) 3. RTB on Bingo Fuel = on waypoint 1 (first waypoint) I would suggest setting this at least 5 miles away from the spawn so that it can make any adjustments, if it is too close it might try a 360 to try again.. 1. Tanker -a ref (should be there by default if tanker task is enabled in waypoint 0) 2. Orbit Inside the Orbit action there will be 2 patterns if you have another waypoint that is next inline after the waypoint you want the orbit to start, see waypoint 2 below. Circle will preform a circle orbit on this waypoint at the speed and altitude you choose until it is bingo fuel.) Race-Track will preform a Race-Track orbit starting from this point and moving to the next point in line (waypoint 2) at the speed and altitude you set until it is bingo fuel waypoint 2 (if race-track) 1. Tanker -a ref (should be there by default if tanker task is enabled in waypoint 0) Let me know if this fixes your issues, if not you can go ahead and send the mission here or in PM and I might just be able to just fix it for you
  21. No problem, glad you’ve sorted it. If you’d like to view your log data live you can use BareTail, so you don’t need to constantly close and reopen your log to check for errors.
  22. Could you attach your mission here? Or provide your dcs.log after running your mission? the log can be located in C:\Users\Your User Name\Saved Games\DCS.openbeta\Logs. It is a text document.
  23. I too find myself in this situation quite often, my little workaround once I have copy+pasted the name into the field and it shows red is to just select the whole name with ctrl+a and then ctrl+v.
  24. Might not work the best using the first one through triggers, I would suggest trying to use Explode Unit
  25. There are two options: 1) Explosion: Creates an explosion of a specified power on a trigger zone at a given altitude 2) Explode Unit: Creates an explosion centered on the unit of a specified volume. Bigger the volume bigger the boom. Information on the two can be found here: Editor Actions
×
×
  • Create New...