Jump to content

MrBill

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by MrBill

  1. More praise for ED and this update! Quick question and apologies if I missed it. Are the Multi threaded changes all merged in as of now, or do we still need to run the separate executable to get MT code?
  2. Just checked. Doh! That is indeed the difference. Thanks Rob! I thought I was losing my mind. So, no bug. I didn't realize that the former was part of the canopy and not the fuselage. Thanks again.
  3. I'll have to check. At first I thought both closed. Both planes are default when you spawn in. I'll post back in a bit.
  4. So, I'm really confused here... I've been working on setting custom snap views for the P-51 since the fuel gauges are so awkward. Tried to set snap view for the rear fuselage gauge and kept getting different renderings of the gauge and the structure around it. I narrowed it down to the -25. Get's one gauge when starting cold and another when hot starting on runway. See the attached mission. Jump into each -25 and look at the gauge. On the hot start, you're looking through a former, on the cold start it's out in the open...HUH?? ChailyNavFlightTest.miz
  5. CFrag, Thanks for your help. I'll make the changes you suggest and test it out. You kind of read my mind a bit as I'm about to expand the list of possible groups a lot and make it less predictable. I'm going to set an objective of killing 3 groups before success is declared. That way, the script can choose from a wider set of possible targets.
  6. Thanks to all for weighing in on this topic. I found some of the negative issues in Chump's original code and kept trying to get this all to work. Here are some key points that I learned: This death of a group thing is a LOT more involved than the simple Group Dead flag available in the editor. And I'm only talking about airborne groups here. The checking logic needs to check multiple times and the Bandits are going down in flames. Testing this code took forever as I had to fly to do it...(boo hoo!) I had a GREAT time working through all this and now have a working script to share. Here's the working script. Assumes groups are single unit are defined and late activated. Hope this helps and have fun! local groupList = {"Bandit1", "Bandit2", "Bandit3"} local activatedGroups = {} local function allGroupsDead() for _, groupName in pairs(activatedGroups) do trigger.action.outTextForCoalition(coalition.side.BLUE, groupName .. " Being checked for death status...", 20) if Group.getByName(groupName) then return false end end return true end local function checkAllDead() if allGroupsDead() then trigger.action.outTextForCoalition(coalition.side.BLUE, "All targets (Groups) have been destroyed!", 20) else trigger.action.outTextForCoalition(coalition.side.BLUE, "Some Groups still Alive, Checking again soon...", 20) timer.scheduleFunction(checkAllDead, {}, timer.getTime() + 30) end end local function activateGroup() local groupName local counter = 0 repeat groupName = groupList[math.random(#groupList)] counter = counter + 1 until not activatedGroups[groupName] or counter > 100 activatedGroups[groupName] = groupName -- if we don't use the counter this locks up in an infinite loop if counter > 100 then trigger.action.outTextForCoalition(coalition.side.BLUE, groupName .. " No more groups to activate, waiting for death!", 20) checkAllDead() return end local group = Group.getByName(groupName) trigger.action.activateGroup(group) trigger.action.outTextForCoalition(coalition.side.BLUE, groupName .. " has been activated!", 20) return group end local function dumpEventInfo(event) local m = {} m[#m+1] = "Event ID: " m[#m+1] = event.id if event.initiator then m[#m+1] = "\nInitiator : " m[#m+1] = event.initiator:getName() end if event.weapon then m[#m+1] = "\nWeapon : " m[#m+1] = event.weapon :getTypeName() end if event.target then m[#m+1] = "\nTarget : " m[#m+1] = event.target :getName() end trigger.action.outText(table.concat(m), 20) end local e = {} function e:onEvent(event) local m = {} if event.id == world.event.S_EVENT_KILL then trigger.action.outText(event.target:getName() .. " Killed by (KILL EVENT )" .. event.initiator:getName(), 20) if allGroupsDead() then trigger.action.outTextForCoalition(coalition.side.BLUE, "All targets (Groups) have been destroyed!", 20) else local delay = math.random(1 * 60, 3 * 60) timer.scheduleFunction(activateGroup, {}, timer.getTime() + delay) end end --dumpEventInfo(event) end world.addEventHandler(e) activateGroup()
  7. Thanks Chump! I truly appreciate the help. I'll test it out and reply when it works. For clarification purposes...if I have a group with one unit in it, should I work at the group or the unit level?
  8. Thanks to all for the help. First point. I started with AI code and modified it through testing and learning. If it's crap code to you, that's because I wrote crap code. You should have seen the original code...nowhere close to actually working. As to investment, I've got nearly 16 hours invested in trying to figure this out. So, please don't think I'm just handing a pile of AI code to the group and saying "fix it for me"...not how I roll. As to the specific point about events on unit.destroy(). I DID read the docs such as they are. And YES, I assumed there would be some kind of event. Obviously not. Found that out by testing. Puzzling to me as I was just trying to shorten the test cycles to get the code to work. So, in the larger scheme of things, forget the destroy logic. And if you look at: function e:onEvent(event) you'll see that it should dump EVERY event (as I understand the example code I used for this). Second point: Sorry for my lack of clarity. I want help with the logic behind how to tell if all my Groups (comprised of only one unit) are dead. Third point: All of this works fine except for the logic to tell when ALL of my units or groups are dead. So, maybe the ask should have been: given a table of groups, can you help me check when they are all dead? And when that test is true, print a message to coalition (which I already have done successfully). Finally: I've gone through all the docs I can find and I'm still not clear on whether this logic should be based at the group level or the unit level? Or, to check for group dead, do I need to loop through each unit in the group and check for IT being dead first? I can find nowhere that this is explained clearly. Seems pretty basic as there is the group dead logic in the mission triggers (if my memory serves).
  9. Hi Guys, I too have been playing with Chat GPT... As a test, I asked it to write some LUA code for a mission I'd like to have. Simple requirements Pick a random group from a pre-defined list and activate it I kill it Pick another one and activate it... Check to see if all are dead then print a message After a couple days of messing around and flying the mission, I've got most of it working except the part that checks for all the dead groups and prints the message. I was flying and shooting missiles to test it...and looking for a faster way. So, I figured I'll just set a timer and destroy the groups after they are activated. None of my event code gets hit on the destroy. So, first question: is there a different event fired on Group.destroy()? I see NO events. Second question: can you review my code and help me out here? I'm truly at a loss. BTW, I'm experienced in SW and coding, just not LUA or DCS coding. Last question: Is there a better way to test this stuff without having to fly it? Are there any inspection tools to debug DCS lua? Thanks in advance! local unitList = {"Bandit1", "Bandit3"} local activatedUnits = {} local function activateUnit() local unit repeat unit = unitList[math.random(#unitList)] until not activatedUnits[unit] activatedUnits[unit] = true local group = Group.getByName(unit) trigger.action.activateGroup(group) trigger.action.outTextForCoalition(coalition.side.BLUE, unit .. " has been activated!", 20) return group end local function allUnitsDead() for num, unitName in pairs(unitList) do local group = Group.getByName(unit) local unit = Unit.getByName(unit) if group then trigger.action.outTextForCoalition(coalition.side.BLUE, unitName .. " FOUND therefore Still alive", 20) return false else trigger.action.outTextForCoalition(coalition.side.BLUE, unitName .. " not found therefore dead", 20) end end return true end function dumpEventInfo(event) local m = {} m[#m+1] = "Event ID: " m[#m+1] = event.id if event.initiator then m[#m+1] = "\nInitiator : " m[#m+1] = event.initiator:getName() end if event.weapon then m[#m+1] = "\nWeapon : " m[#m+1] = event.weapon :getTypeName() end if event.target then m[#m+1] = "\nTarget : " m[#m+1] = event.target :getName() end trigger.action.outText(table.concat(m), 20) end local e = {} function e:onEvent(event) local m = {} if event.id == world.event.S_EVENT_KILL then trigger.action.outText(event.target:getName() .. " Killed by " .. event.initiator:getName(), 20) if allUnitsDead() then trigger.action.outTextForCoalition(coalition.side.BLUE, "All units have been destroyed!", 20) else local delay = math.random(10, 15) timer.scheduleFunction(activateUnit, {}, timer.getTime() + delay) end end if event.id == world.event.S_EVENT_DEAD then trigger.action.outText(event.target:getName() .. " UNIT DEAD Event " .. event.initiator:getName(), 20) end dumpEventInfo(event) end world.addEventHandler(e) activateUnit() function testDestroy() Group.destroy(Group.getByName(currentGroup)) trigger.action.outTextForCoalition(coalition.side.BLUE, "Destroying Current Group: " .. currentGroup, 20) end timer.scheduleFunction(testDestroy, {}, timer.getTime() + 35)
  10. This is now fixed after the recent update. Thanks!
  11. After 2.7 update. Never tried this before so, I can't say if it worked before. Following all procedures as I understand them. Arm with pull handle on left of seat Rocket and Tank selector up Selector Release switch UP Uncover master arm Switch master arm up and bomb(s) are released. Track file attached. P47BombTest.zip
  12. Probable Bug JDAM / LGB Same Loadout I can't get a GBU-12 to come off the jet after a GBU-38 has been dropped. Here's the facts: PG map Litening POD Configure fusing on both bombs before making a pass. Codes correct on pod and GBU-12. Drop GBU-38 successfully Make another pass with GBU-12. It won't come off the pylon. Seems to be within params for Auto release. Configured correctly. Come around for another pass Cycle Master Arm with no other changes and she comes off and destroys target. Track attached. If I'm missing something, I'd love to know what I'm doing wrong. Thanks! JDAM_LgbBug.trk
  13. Thanks for the tip. Turns out it was user error. My bad. Got some good knowledge from diving into the Config folder. But there is no bug. Sorry.:music_whistling:
  14. Trying to practice A2A refueling in prep for the Viper. Using the F-15. I have confirmed this in 2 missions. Airstart at 19000 450kts. Right engine is running, left engine starts at idle and slowly spools down too about 23% or something like that. Have to hit Alt-Home to restart it. This is since the latest update in open beta. 2.5.5.35461 I know this started since the latest update. Also, appears like the refueling boom control LCntl-R only turns on. No way to turn it off or toggle it. Miz file attached. Thanks Aerial Refueling Training F-15C_ WFH.miz
  15. I am not positive about this, but I have heard from other more experienced Hornet pilots that you need at least 16 units of elevator trim off the carrier to avoid this message. Check the FCS page and set before takeoff.:thumbup:
  16. You are correct sir! Two add buttons, not paying close enough attention. Thanks! No bug. User error.
  17. Sorry, for posting this. I noticed that there is an axis for this assigned to the mouse. I tried but couldn't get this to work.
  18. Single player mode...looks like it's not updating any elements of the logbook. I've flown for hours since I've gotten the module and no entry. Can't tell if the overall totals are being updated.
  19. I think there is some kind of latching issue with modifiers for controls. I have a throttle button for airbrake extend and retract and that same button is used for wheel brakes with a modifier on my joystick (button 3). I think that it alternates. E.g. on landing: modifier and button pressed - brakes on pumping the brakes, I let off both modifier and button press them again and nothing happens - air brake retract (already down, so no action) Press them again and I get breaking on the wheel brakes This pattern seems to continue. I'm not sure how to describe it better, but I'm sure it has to do with a modifier button.
  20. First off, Thanks ED for a wonderful module and new map! Can we get an axis(s) for the radar TDC as opposed to having to bind each direction to a switch? I have a micro joystick on my throttle and this would be very helpful. Thanks!
  21. But if you bought it from someone else, it may still be registered on ED servers as belonging to the original purchaser. Not sure about the rules for license Xfer.
  22. So, I've been practicing this a bit since I started the thread, and YES, you can kill a T-80. I found the best way to do it is a STEEP dive to punch holes in the top and to get VERY close before you fire. I was able to kill 2 tanks with a full load of ammo which is way better than yesterday. I will say that trying to kill tanks with the gun makes the APC look like a piece of cake one short burst and buh buy! Thanks for posting the video, pretty scary.
  23. Thanks for the replies. I've been coming in from a fairly steep angle behind the tank. In subsequent tests after the posted track, it's the same thing. I took unlimited ammo and really tried to be super accurate and then just let 'em have it...it took about 1590 hits to kill a T-80 from the rear. On the other hand, one 2 second burst kills a BTR-80 (131 hits). It's making me feel inadequate!
  24. I know there have been discussions in the past about this topic...like this: https://forums.eagle.ru/showthread.php?t=183785&highlight=gau-8+damage+model But, I can't seem to put a scratch on one of these guys with the gun. Any advice or is this a damage model thing? I've attached the track and a TacView showing HUNDREDS of hits..WTF over? :-) Thanks guys! UnkillableTankA10.trk Tacview-20180303-143517-DCS-A10TankBustRunwayGunPractice.zip
  25. Hi all, So I'm super excited to be able to control trains in the mission editor and make train hunting missions. I've noticed a couple of issues: The trains appear to work great in mission editor and follow waypoints, but I don't seem to be able to control the speed. They seem to go the default speed no matter what I set it to in ME. They appear to not trigger events when entering a zone. I wanted the train to explode when it entered a zone. FYI, I'm trying to simulate the huge explosion when the Loco is hit based on a % of Group Alive. I'm getting no reaction as the train enters the zone. I've attached the mission file which should make it all more clear. Thanks to the ED team for this cool piece of functionality!! P51TrainBustTest.miz
×
×
  • Create New...