markturner1960 Posted January 1 Posted January 1 Hi, I have a carrier mission with some deck statics which I time to remove after 30 mminutes, to facilitate recovery later in the mission. I have split the clearance into two scripts and in testing in single player, it worked perfectly. Today, flying the mission in multiplayer, only half of the statics on the second script action were cleared / destroyed..... What might cause this? System specs: PC1 :Scan 3XS Ryzen 5900X, 64GB Corsair veng DDR4 3600, EVGA GTX 3090 Win 10, Quest Pro, Samsung Odyssey G9 Neo monitor. Tir5. PC2 ( Helo) Scan 3XS Intel 9900 K, 32 GB Ram, 2080Ti, 50 inch Phillips monitor F/A-18C: Rhino FFB base TianHang F16 grip, Winwing MP 1, F-18 throttle, TO & Combat panels, MFG crosswind & DFB Aces seat Viper: Tianhang FSB Pro base with F-16 grip, Winwing F-16 throttle, plus ICP. MFG crosswind rudders. Helo ( Apache) set up: Virpil collective with AH64D grip, Cyclic : Rhino FFB base & TM F18 grip, MFG crosswind rudders, Total controls AH64 MFD's, TEDAC Unit.
cfrag Posted January 1 Posted January 1 1 hour ago, markturner1960 said: Today, flying the mission in multiplayer, only half of the statics on the second script action were cleared / destroyed..... What might cause this? Perhaps it might help if you showed the script or a simplified miz that reproduces the issue. In cases like this, I usually go either trigger.action.outText() or env.info() for each script with an "I'm here" to make sure that the various branches and methods are really invoked. Safest bet: some of your code isn't invoked.
markturner1960 Posted January 1 Author Posted January 1 Thanks, here are the 2 script files, just tested again and they worked fine in single player....... Remove Static.lua Remove Statics for recovery.lua System specs: PC1 :Scan 3XS Ryzen 5900X, 64GB Corsair veng DDR4 3600, EVGA GTX 3090 Win 10, Quest Pro, Samsung Odyssey G9 Neo monitor. Tir5. PC2 ( Helo) Scan 3XS Intel 9900 K, 32 GB Ram, 2080Ti, 50 inch Phillips monitor F/A-18C: Rhino FFB base TianHang F16 grip, Winwing MP 1, F-18 throttle, TO & Combat panels, MFG crosswind & DFB Aces seat Viper: Tianhang FSB Pro base with F-16 grip, Winwing F-16 throttle, plus ICP. MFG crosswind rudders. Helo ( Apache) set up: Virpil collective with AH64D grip, Cyclic : Rhino FFB base & TM F18 grip, MFG crosswind rudders, Total controls AH64 MFD's, TEDAC Unit.
cfrag Posted January 1 Posted January 1 (edited) Interesting. I had a quick look at the second script and the one thing that immediately jumped out is that StaticObject.getByName('Static Carrier Seaman-2-1'):destroy() is in there twice (along with some others). I assume that when executed the second time on a deleted object, getByName() returns nil, and trying to invoke nil:destroy will (correctly) terminate the script, with some very explicit messages in the log. I have no idea why it works on singleplayer, except that maybe script execution is immediate on the server, while collated on single-player? It may be due to the fact that server isn't yet multi-threaded and the game waits for a response before proceesing, halting execution -- but bustling through on a multi-threaded invocation (it should not, however, mysterious) Edited January 1 by cfrag
markturner1960 Posted January 1 Author Posted January 1 Wow! I am impressed! Let me correct the errors and try it in the server....it may be tomorrow before I can report back though...thanks very much! System specs: PC1 :Scan 3XS Ryzen 5900X, 64GB Corsair veng DDR4 3600, EVGA GTX 3090 Win 10, Quest Pro, Samsung Odyssey G9 Neo monitor. Tir5. PC2 ( Helo) Scan 3XS Intel 9900 K, 32 GB Ram, 2080Ti, 50 inch Phillips monitor F/A-18C: Rhino FFB base TianHang F16 grip, Winwing MP 1, F-18 throttle, TO & Combat panels, MFG crosswind & DFB Aces seat Viper: Tianhang FSB Pro base with F-16 grip, Winwing F-16 throttle, plus ICP. MFG crosswind rudders. Helo ( Apache) set up: Virpil collective with AH64D grip, Cyclic : Rhino FFB base & TM F18 grip, MFG crosswind rudders, Total controls AH64 MFD's, TEDAC Unit.
markturner1960 Posted January 3 Author Posted January 3 (edited) Hey Cfrag, had a chance to mess around with this. I found numerous duplicates, so re wrote the script more carefully! I also split it into 2, one to clear the deck behind the island and one in front. I have been through it several times and cant see any errors or duplicates or anything that would cause an issue.... It works perfectly in single player, yet on my server, the rear clear script works great, but the front clear seems to stop after the Greyhound. Cant figure out why. I post the troublesome one below: (Let me know if you need the mission as well, I have not posted as it has audio and is 56mb, to big to post here.....Send me a DM with your discord if you like and I can send it via that) Or I can send you a link to my discord server where the mission is posted Remove StaticFwd.lua Edited January 3 by markturner1960 System specs: PC1 :Scan 3XS Ryzen 5900X, 64GB Corsair veng DDR4 3600, EVGA GTX 3090 Win 10, Quest Pro, Samsung Odyssey G9 Neo monitor. Tir5. PC2 ( Helo) Scan 3XS Intel 9900 K, 32 GB Ram, 2080Ti, 50 inch Phillips monitor F/A-18C: Rhino FFB base TianHang F16 grip, Winwing MP 1, F-18 throttle, TO & Combat panels, MFG crosswind & DFB Aces seat Viper: Tianhang FSB Pro base with F-16 grip, Winwing F-16 throttle, plus ICP. MFG crosswind rudders. Helo ( Apache) set up: Virpil collective with AH64D grip, Cyclic : Rhino FFB base & TM F18 grip, MFG crosswind rudders, Total controls AH64 MFD's, TEDAC Unit.
cfrag Posted January 4 Posted January 4 12 hours ago, markturner1960 said: Let me know if you need the mission as well Why don't we try this: use the new band selection tool to select the entire carrier and all objects, then paste it into a new mission (you need to activate band selection prior to pasting. Yeah, ED is *really* bad at UX design). Add the script and see if it runs in SP and MP, and if it fails send it to me (if it doesn't the root cause might be outside of the script) In the meantime, I'll look at the script.
cfrag Posted January 4 Posted January 4 12 hours ago, markturner1960 said: Cant figure out why. I slightly modified your script to call more attention to possible issues and print them out: local verbose = true local function dx(name) if verbose then trigger.action.outText("---start dx on <" .. name .. ">", 30) end local ob = StaticObject.getByName(name) if ob then Object.destroy(ob) if verbose then trigger.action.outText("---dx: OK", 30) end else trigger.action.outText("---dx: <" .. name .. "> does not exist", 30) end end dx('Static S-3B Tanker-1-1') dx('Static E-2D-1-1') dx('Static C-2A Greyhound-1-1') dx('Static F/A-18C Lot 20-5-1') dx('Static F/A-18C Lot 20-4-1') dx('Static F/A-18C Lot 20-3-1') dx('Static F/A-18C Lot 20-14-1') dx('Static F/A-18C Lot 20-2-1') dx('Static F/A-18C Lot 20-1-1') dx('Static Carrier Technician-1-1') dx('Static Carrier Seaman-1-1') dx('Static Carrier Seaman-2-1') dx('Static M117 bombs-5-1') dx('Static M117 bombs-4-1') dx('Static M117 bombs-3-1') dx('Static M117 bombs-2-1') dx('Static M117 bombs-1-1') dx('Static AS32-P25-1-1') dx('Static AS32-32A-1-1') Maybe that can help?
markturner1960 Posted January 6 Author Posted January 6 Thanks, I will take a look over the next few days, been busy with family stuff over the weekend, and this week am working, so it may be a few days..... I have to say, my knowledge of scripting is extremely basic, I copied the destroy static one from somewhere else, so dont really feel qualified to comment on your suggestions! I did approach it from another direction, which was to split the scripts at the point where it stopped (IE which object on the list was still there. That seemed to work on the one for the statics in front of the Island, but no idea why that was so. Thank you very much for looking into it with me, very helpful! System specs: PC1 :Scan 3XS Ryzen 5900X, 64GB Corsair veng DDR4 3600, EVGA GTX 3090 Win 10, Quest Pro, Samsung Odyssey G9 Neo monitor. Tir5. PC2 ( Helo) Scan 3XS Intel 9900 K, 32 GB Ram, 2080Ti, 50 inch Phillips monitor F/A-18C: Rhino FFB base TianHang F16 grip, Winwing MP 1, F-18 throttle, TO & Combat panels, MFG crosswind & DFB Aces seat Viper: Tianhang FSB Pro base with F-16 grip, Winwing F-16 throttle, plus ICP. MFG crosswind rudders. Helo ( Apache) set up: Virpil collective with AH64D grip, Cyclic : Rhino FFB base & TM F18 grip, MFG crosswind rudders, Total controls AH64 MFD's, TEDAC Unit.
Recommended Posts