Jump to content

Wizxrd

Members
  • Posts

    91
  • Joined

  • Last visited

Everything posted by Wizxrd

  1. Hi, at the time that I made this script yes the main goal was to just provide simple functions to endlessly activate/deactivate statics. It wasn't made to help with performance or anything like that, just a simple script to be able to set statics as "late activated". Hope this helps, if the directions aren't clear, feel free to ask any more questions you may have!
  2. local newHeading = heading*math.pi/180 That should do the trick!
  3. As long as the power is 1 I don’t think that should be any worry, that is unless someone is obviously right next to them which there might be some… splash damage lol
  4. Are you using the AttackGroup task? If so there is an option to set the altitude for which they won’t attack under, also make sure to tick the checkbox to enable it so it doesn’t go below that set altitude.
  5. You can use the explosion function which will drop an explosion on a specific point combined with the kg equivalent for TNT. You can find it here: https://wiki.hoggitworld.com/view/DCS_func_explosion
  6. Would you mind sharing with us the mission you’re testing and code to go with it? Would better help figure out what’s going on here
  7. Pretty sure I've solved your problem, I was unsure if you were using MOOSE or just the SSE, but now I see MOOSE. Methods in MOOSE most likely always start with capital, while SSE starts with lowercase: MOOSE :GetName() SSE :getName() so keep that in mind when utilizing moose Any who here is the changed code: AllStatics:ForEachStatic(function(staticObj) local _name = staticObj:GetName() if ( string.match(_name, "CTLD ") ) then env.info("Found CTLD static: "..staticObj:GetName()) env.info("Found CTLD static X: ".. staticObj:GetVec2().x .." Y: ".. staticObj:GetVec2().y) env.info("Found CTLD static Country: ".. staticObj:GetCountry()) SaveStatics[staticObj:GetName()] = { ["heading"] = staticObj:GetHeading(), ["groupId"] =staticObj:GetID(), ["shape_name"] = staticObj:GetTypeName(), ["type"] = staticObj:GetTypeName(), ["unitId"] = staticObj:GetID(), ["rate"] = 20, ["name"] = staticObj:GetName(), ["category"] = staticObj:GetCategoryName(), ["y"] = staticObj:GetVec2().y, ["x"] = staticObj:GetVec2().x, ["Country"] = staticObj:GetCountry() } end end) A few things to note: When iterating through sets you should use the appropriate for method, in this case for statics we iterate with ForEachStatic. Changed string.starts to string.match, unless you've made your own function I'd suggest just using string.match, because that function does not exist Instead of using the SSE :getPoint() method, that log entry now just uses the GetVec2 method to print the x, y coords. Changed getCountry to GetCountry for your 3rd log message
  8. Would you mind sharing the code you're using?
  9. The function getPoint is what you’re looking for. It returns a vec3 table for x, y, and x. Where z is actually the y axis.
  10. To answer some of your questions, the reason the radius is 304.xxx is because it's feet converted to meters. I'm not sure about that change made to ["point"], all it needs basically is the x and y unchanged (at least that's how I've always used it, but if it works, it works :D) As for the issue of finding units that aren't supposed to be in that zone, the only way I could sort of replicate it is if there are units close to the outside perimeter of the zone, < 100 ft will find them "in zone". I wasn't able to reproduce the issue where you returned both a group and unit object within the same foundUnits table, if you sent the Object.Category.UNIT as the category then it will only return unit objects so that one is puzzling me But all in all glad you've made it work for what you needed!
  11. I think this might be what you're looking for, but let me know. A function that will search a trigger zone for any object category and check if any of the found objects are of matching coalition. It will return as an array of objects if there is anything found that matches coalition and returns nil if nothing was found that matches coalition. Here's an usage example of the function ScanZone: -- variable for any found units local UnitsInSenakiZone = ScanZone(Object.Category.UNIT, coalition.side.BLUE, "Senaki Zone") -- simple check to print the found units or no found units if UnitsInSenakiZone ~= nil then for _, object in pairs(UnitsInSenakiZone) do trigger.action.outText(object:getName().." is in Senaki Zone", 15) end else trigger.action.outText("no units were found in Senaki Zone", 15) end Here's the script that contains the ScanZone function so you can include in your code/mission: ScanZone.lua
  12. I’m not sure how I missed this, so sorry! Hopefully you were able to use it for what you were doing! I’m actually coming back to this script and it will undergo a full rewrite to be better suited for spawning statics with a wider variety of methods. Thanks for checking it out many months ago happy new year!
  13. In short, the measurement comes from loads of my own testing. It gathers data on your hardware and then from the optimization you choose it will change each setting on an individual level within some defined limits. It’s a step above the standard low, medium, high you see in game because this actually factors in your own hardware and changes accordingly. But as SharpeXB has said, it has been what I’ve found to be the “optimal” change for each setting.
  14. Hello all, thought I might pop in and share with you what I may have to offer. I have a created a benchmark GUI solution that is capable of optimizing your graphics settings in 3 different ways. Quality, FPS, and Balanced. Each one of those optimizations will provide the best possible settings without sacrificing too much of the other. Ie Optimizing for FPS will provide you the best FPS without ruining quality, and balanced is a fine medium between FPS and Quality. Here you can see an example of a Balanced Optimization for a user who tested it. However a bit more testing is needed for me to be happy with it. It also does not consider you are using VR and is purely meant to be for 2D optimizing. This project has been on the back burner for some time due to me not having ample time to test it further, but if this has sparked any interest amongst anyone, please reach out via PM here or on discord DM @Wizard#5064 and I will provide you with the solution in exchange for valued feedback!
  15. If I’m understanding right, you want to be able to write out individual lines in your script, but want them all wrapped into a single message that appears in game. If so this might be what your looking for: local messageList = { "here is the first line, ", "here is the second line, ", "here is the third line.", } local inGameMsg = table.concat(messageList) trigger.action.outText(inGameMsg, 15) This is just a super basic example of how you could go about doing it, give it a test and let me know if it’s what you were looking for
  16. Simple Statics Download: Simple Statics.zip Description standalone script to activate and deactivate statics an endless amount of times. Configuration 1. include simpleStatics.lua into your mission: TRIGGERS: ONCE -> CONDITIONS: TIME MORE (1) -> ACTIONS:DO SCRIPT FILE (simpleStatics.lua) 2. add your static objects in the mission editor with the defined prefix of "LA" example: "LA Outpost" 3. add a simple trigger to activate TRIGGERS: ONCE -> CONDITIONS: TIME MORE (5) -> ACTIONS: DO SCRIPT (static.activate("LA Outpost")) 4. add a simple trigger to deactivate TRIGGERS: ONCE -> CONDITIONS: TIME MORE (10) -> ACTIONS: DO SCRIPT (static.deactivate("LA Outpost")) Limitations - static group and unit names must be the same - you can only activate a static object if you've given it a name with the prefix "LA" - you can deactive any static object by name, but any static you deactivate without the prefix "LA" cannot be activated again and statics with the prefix "LA" can be activated again - activating a static that has previously been destroyed will spawn in the desctruction - if you're in F10 and a static is deactivated within your screens view of the map, it will stick visually to your screen Features - any static object name given the prefix "LA" will be deactivated at mission start to mimic the actual late activation option Example mission - included is simpleStatics.miz, a basic mission using triggers to activate and deactivate a static for the 2 following conditions: 1. unit in zone - static activate groups 2. unit outside zone - static deactivate groups List of Functions: static.activate - activate a static object by name static.deactivate - deactivate a static object by name static.activateGroups - activate a set of groups by prefix static.deactivateGroups - deactivate a set of groups by prefix
  17. No setting to despawn inactive aircraft objects, however I have made a script that will do this for you automatically, check it out here: Cleanup Scheduler give the docs a read and see if it’s what you’re looking for, enjoy!
  18. Unfortunately your track was broken. I've tried again and still couldn't reproduce the issue. Here is a short track trying to replicate. f16_steerpoint.trk
  19. You can use TMS Left Short < 1 second for a scan of all contacts on the FCR or TMS Left Long > 1 second to scan targets on a specific azimuth aligned with your cursor. When scanned, if targets are friendly they will appear with a green circle around the contact, if they aren't friendly you'll be given no extra information around the contact. Here is a good video from Wags explaining IFF: Hope this helps some!
  20. I cannot reproduce this issue, could you please provide a short track with the problem you're having? Thanks!
  21. I cannot reproduce. Mission provided with 3 KA-50's each set to takeoff parking hot, ramp, and runway all on the LHA-1 Tarawa with no issues. Unsure of why you might not be able to, you can try running a repair. If it still persists after a repair, please post a short video of the issue. Thanks. ship_takeoff.miz
  22. Hi, thanks for the log. It looks like you're getting many device plugged and unplugged messages. You can try ensuring that all of your USB devices are seated properly and by disabling hot plug, which can be done found in the autoexec.cfg in C:\Users\Your User\Saved Games\DCS.openbeta. Inside make sure it looks like this: no_device_hotplug = true. Alternatively you can do this through the control settings GUI.
  23. I am unaware of a solution to have a group be already spawned in and then change the group name or unit name later on.
  24. 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
×
×
  • Create New...