mwd2 Posted December 8, 2013 Share Posted December 8, 2013 Im probably behind the times on this one but one thing I noticed is if you pick up a custom group, say georgians that are on the blue side, it will unload the generic nato troops. Doesnt keep track of the units you pick up. you have in the CTTS only Russia, USA and Insurgents groups .... go to line 519 in the CTS.lua file. You will need to add other countries. Playing: F-16C Intel i7-13700KF, 64GB DDR5 @5600MHz, RTX 4080 ZOTAC Trinity, WIN 11 64Bit Prof. Squadron "Serious Uglies" / Discord-Server: https://discord.gg/2WccwBh Ghost0815 Link to comment Share on other sites More sharing options...
gunterlund21 Posted December 9, 2013 Share Posted December 9, 2013 you have in the CTTS only Russia, USA and Insurgents groups .... go to line 519 in the CTS.lua file. You will need to add other countries. mwd I dont see anything in line 519 that reference countries. I see side 1 and 2 and that is it. I was in Art of the Kill D#@ it!!!! Link to comment Share on other sites More sharing options...
Midnight Posted January 23, 2014 Share Posted January 23, 2014 Is there any hope of rescuing this script, it lost much of it's functionality after the last couple of updates? Quite frankly the best script for mission builders that I have seen. Link to comment Share on other sites More sharing options...
ENO Posted January 23, 2014 Share Posted January 23, 2014 Agreed ^ Dynamically spawned unit bug, with 127 may be hampering progress however. But yes- I love the scoot and its broad functionality. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art Link to comment Share on other sites More sharing options...
Robin_Hood Posted February 14, 2014 Share Posted February 14, 2014 Hi, I am currently struggling to spawn units with coalition.AddGroup, and have them loaded right away, it I can't seem to have it working (well, it does sometimes). ENO, what do you call "Dynamically spawned unit bug" ? I'd like to know if I'm experiencing some kind of bug. If there isn't a big issue that I can't do a thing about, I will explain more what I have. 2nd French Fighter Squadron Link to comment Share on other sites More sharing options...
ENO Posted February 15, 2014 Share Posted February 15, 2014 That bug should be fixed with 127 / MIST 3.3. Depending on which one you were refering to- one resulted in a memory leak while the other was basically a lack of sync between client and server. The one I found wasn't address with the CTTS script in particular was something that Grimes pointed me at. I'll look back at the line but the way it works is if you have more than 100 units, the CTTS script overwrites it... or versa vice. So I needed to go in and edit the script so the unit numbers started at 1000 or 10000... whichever. Basically a number that would never be overwritten. That solved my second CTTS problem. I'm not sure if that's the same problem, however. This generally resulted in the units spawning in- but then people being unable to join in with different aircraft or positions. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art Link to comment Share on other sites More sharing options...
Bruce_D Posted February 15, 2014 Share Posted February 15, 2014 I’ve made a little modification on the RagnarDa’s script (http://forums.eagle.ru/showthread.php?t=106083&highlight=board+vehicle&page=2) to unload troops anywhere in the map from a BMP-2. After the disembark I want to load the troops again in the BMP-2 and unload them in another area. My doubt is how to do a soldier that died after the first disembark not appear again when the group loads into the BMP-2 and disembark in another area? I’ve looked into the geloxo’s script (CTTS), but I couldn’t find the answer. Does anybody know if the answer is there? I’ve attached the mission and the script but they are not complete yet. ThanksPoti.mizPotiScript.lua Link to comment Share on other sites More sharing options...
Robin_Hood Posted February 15, 2014 Share Posted February 15, 2014 Thanks, ENO, this doesn't seem to be the issue I am having. So here I will try to explain a bit more. What I want to achieve, is to spawn a unit with coalition.addGroup, and load it with CTTS right away. Somehow it doesn't load the vehicule (but a later LoadTransport does). So here is a simplified version of my code, that still doesn't work. It is for the default CTTS (default transport names). I have two radio items. One calls a function that spawns an M2A2 and then calls LoadTransport. The other simply calls LoadTransport. function LoadM2A2 () -- simple call of LoadTransport LoadTransport("transport1", 6) end function SpawnM2A2 (Location) local pos = trigger.misc.getZone(Location) -- gets the zone location local ranpos = {} ranpos.x = pos.point.x + math.random(pos.radius * -1, pos.radius) ranpos.z = pos.point.z + math.random(pos.radius * -1, pos.radius) -- randomize spawn position within zone local data = { ["visible"] = false, ["name"] = "Troop transport", ["task"] = {}, ["hidden"] = false, ["units"] = { [1] = { ["x"] = ranpos.x, ["y"] = ranpos.z, ["type"] = "M-2 Bradley", ["name"] = "transport1", ["heading"] = 0, ["playerCanDrive"] = true, ["skill"] = "Average", }, -- end of [1] }, -- end of ["units"] } -- unit data, with unit name "transport1" coalition.addGroup(country.id.USA, Group.Category.GROUND, data) -- spawns the group LoadM2A2() -- should load troops, but doesn't end missionCommands.addCommandForCoalition(coalition.side.BLUE, "Spawn M2A2 Bradley", nil, SpawnM2A2, "SpawningZone") -- adds radio item missionCommands.addCommandForCoalition(coalition.side.BLUE, "Load M2A2 Bradley", nil, LoadM2A2, nil) -- adds radio item So when you try it (test mission and .lua attached), the unit spawns, but empty. Then if you use the "Load M212 Bradley" radio item, it loads as expected. I cannot understand why it doesn't work. The funny thing is, I just noticed, if I make it spawn again, it will now be loaded.Spawn.mizSpawn.lua 2nd French Fighter Squadron Link to comment Share on other sites More sharing options...
ENO Posted February 15, 2014 Share Posted February 15, 2014 Sorry Robin- I'd just be guessing and don't think I'd be much help. Only thing I can think of is your script might need a few seconds from start before CTTS is applied. 1 "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art Link to comment Share on other sites More sharing options...
shagrat Posted February 16, 2014 Share Posted February 16, 2014 ENO has a valid point here. The larger scripts, like MIST, RagnarDa's MEDEVAC or CTTS may need a few seconds to be loaded into memory and have the script functions available... if you call a function before it is loaded, it will fail. Try delaying your script with a "TIME MORE THAN, 10 sec" trigger, that should be enough for MIST and CTTS to initialize first. If this doesn't solve your problem we need to look further.:smartass: 1 Shagrat - Flying Sims since 1984 - Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B | TrackIR5 | Simshaker & Jetseat | VIRPIL CM 50 Stick & Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore) Link to comment Share on other sites More sharing options...
Robin_Hood Posted February 17, 2014 Share Posted February 17, 2014 Thanks a lot for the input. I finally got it working by combining your suggestion (2 seconds seems enough for now) with a timer that delays the LoadTransport call by 5 seconds (2 seconds wouldn't work). The strange thing is I had tried those two solutions before, maybe I hadn't tried the right combination. :doh: Well, I will see if it keeps working consistently with my complex script, but I have hope now :) 2nd French Fighter Squadron Link to comment Share on other sites More sharing options...
ENO Posted February 17, 2014 Share Posted February 17, 2014 05969.987 ERROR DCS: Mission script error: : [string "C:\Users\Eno\AppData\Local\Temp\DCS\/~mis00..."]:777: attempt to index local 'leader' (a nil value) stack traceback: [C]: ? [string "C:\Users\Eno\AppData\Local\Temp\DCS\/~mis00..."]:777: in function 'FindNearestEnemy' [string "C:\Users\Eno\AppData\Local\Temp\DCS\/~mis00..."]:1409: in function 'CallSpawn' [string "CallSpawn("blue", 4, "spawn1", 100)"]:1: in main chunk Just curious- I'm not sure if this is a mist thing or CTTS thing... I have a variety of spawns that occur and I thought this one was the same. I think this is the first time I've got this error... look familiar? I checked the name of the spawn location and it's good... which aspect of this error should I be investigating? Reload CTTS? "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art Link to comment Share on other sites More sharing options...
shagrat Posted February 17, 2014 Share Posted February 17, 2014 Similar issue here. Honestly I've no idea what is the root cause. Since I currently load 3 scripts in that mission, I'll start testing step by step... Seems the CallSpawnFunction tries to find the unit it is about to spawn and fails? I'm no script guru or programmer so it's just my wits against bloody ones and zeros...:helpsmilie: 00096.711 ERROR DCS: Mission script error: : [string "C:\Users\user\AppData\Local\Temp\DCS\/~mis0..."]:4244: Unit doesn't exist stack traceback: [C]: ? [C]: in function 'getName' [string "C:\Users\user\AppData\Local\Temp\DCS\/~mis0..."]:4244: in function 'f' [string "C:\Users\user\AppData\Local\Temp\DCS\/~mis0..."]:509: in function 'onEvent' [string "Scripts/World/EventHandlers.lua"]:13: in function <[string "Scripts/World/EventHandlers.lua"]:11> [C]: in function 'addStaticObject' [string "C:\Users\user\AppData\Local\Temp\DCS\/~mis0..."]:606: in function 'ConfigObject' [string "C:\Users\user\AppData\Local\Temp\DCS\/~mis0..."]:582: in function 'NewStructure' [string "C:\Users\user\AppData\Local\Temp\DCS\/~mis0..."]:1485: in function 'CallSpawnLogistics' [string "CallSpawnLogistics("blue", 2, "spawn1", 30)"]:1: in main chunk Shagrat - Flying Sims since 1984 - Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B | TrackIR5 | Simshaker & Jetseat | VIRPIL CM 50 Stick & Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore) Link to comment Share on other sites More sharing options...
shagrat Posted February 17, 2014 Share Posted February 17, 2014 Ok, it seems to work now! What I changed: Use MIST 3.3 !!! and increased the base object ID counters in CTTS, as already mentioned somewhere in the thread. Rather than 100 it's now 10000! When cascading the scripts on load with trigger conditions and give them time to load, it seems now perfect to me.:D groupCounter = 10000 unitCounter = 10000 logcargoCounter = 10000 Shagrat - Flying Sims since 1984 - Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B | TrackIR5 | Simshaker & Jetseat | VIRPIL CM 50 Stick & Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore) Link to comment Share on other sites More sharing options...
ENO Posted February 18, 2014 Share Posted February 18, 2014 Okay this was an older mission too so I'll do that. Pretty sure my unit counter was already changed but I'll double check. Thanks shag "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art Link to comment Share on other sites More sharing options...
WildBillKelsoe Posted February 23, 2014 Share Posted February 23, 2014 thank you so much for this great script AWAITING ED NEW DAMAGE MODEL IMPLEMENTATION FOR WW2 BIRDS Fat T is above, thin T is below. Long T is faster, Short T is slower. Open triangle is AWACS, closed triangle is your own sensors. Double dash is friendly, Single dash is enemy. Circle is friendly. Strobe is jammer. Strobe to dash is under 35 km. HDD is 7 times range key. Radar to 160 km, IRST to 10 km. Stay low, but never slow. Link to comment Share on other sites More sharing options...
dooom Posted March 8, 2014 Share Posted March 8, 2014 (edited) I'm getting a script error using the Original Poster's Transport tutorial.miz The window pops up as soon as the mission tries to demonstrate the spawning of the enemy groups that will look for troops to engage at the base. Can someone please confirm? is the CTTS script bugged with 1.27? 00253.612 ERROR DCS: Mission script error: : [string "C:\Users\KIRKAD~1\AppData\Local\Temp\DCS\/~..."]:789: Group doesn't exist stack traceback: [C]: ? [C]: in function 'getName' [string "C:\Users\KIRKAD~1\AppData\Local\Temp\DCS\/~..."]:789: in function 'FindNearestEnemy' [string "C:\Users\KIRKAD~1\AppData\Local\Temp\DCS\/~..."]:1404: in function 'CallSpawn' [string "CallSpawn("red", 2, "spawn", 1000)..."]:1: in main chunk Edited March 8, 2014 by dooom ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
WildBillKelsoe Posted March 8, 2014 Share Posted March 8, 2014 I'm getting a script error using the Original Poster's Transport tutorial.miz The window pops up as soon as the mission tries to demonstrate the spawning of the enemy groups that will look for troops to engage at the base. Can someone please confirm? is the CTTS script bugged with 1.27? No. It works fine. Just make sure that the pilot name is helicargo1 and not unit name. Also, reset the mission init script then reload the CTTS.LUA and should work seamlessly. Let me know if that solved your issue. AWAITING ED NEW DAMAGE MODEL IMPLEMENTATION FOR WW2 BIRDS Fat T is above, thin T is below. Long T is faster, Short T is slower. Open triangle is AWACS, closed triangle is your own sensors. Double dash is friendly, Single dash is enemy. Circle is friendly. Strobe is jammer. Strobe to dash is under 35 km. HDD is 7 times range key. Radar to 160 km, IRST to 10 km. Stay low, but never slow. Link to comment Share on other sites More sharing options...
dooom Posted March 8, 2014 Share Posted March 8, 2014 ok - i'll try ... i'll report back in a sec. ... sorry not quite sure what you mean by "reset the mission init script then reload the CTTS.LUA" . the tutorial.miz was not altered in any way from the page one download so i'll check the naming. FYI I just ran the Airmobile Frontline mission and received the same error when it tried to callspawn red. ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
ENO Posted March 8, 2014 Share Posted March 8, 2014 Sometimes you need to delete the init file, save the mission (resets the init file to blank), then reload it the init file (CTTS.lua) and save again... I think that's what he was talking about. I find sometimes I need to do the same with MIST "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art Link to comment Share on other sites More sharing options...
WildBillKelsoe Posted March 8, 2014 Share Posted March 8, 2014 ah ok, the callspawn red function is borked. I should've read carefully. Yes I confirm you can't spawn reds but loading and unloading your chopper still works, right? AWAITING ED NEW DAMAGE MODEL IMPLEMENTATION FOR WW2 BIRDS Fat T is above, thin T is below. Long T is faster, Short T is slower. Open triangle is AWACS, closed triangle is your own sensors. Double dash is friendly, Single dash is enemy. Circle is friendly. Strobe is jammer. Strobe to dash is under 35 km. HDD is 7 times range key. Radar to 160 km, IRST to 10 km. Stay low, but never slow. Link to comment Share on other sites More sharing options...
dooom Posted March 8, 2014 Share Posted March 8, 2014 Nope - still getting the script error on CallSpawn. .miz attached. I clicked "reset" one the initialization bar and the CTTS.lua disappeared. I then clicked "Open" and reselected the CTTS.lua file and saved the .miz Then i tried to run the miz again and still received the script error.Transport Tutorial.miz ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
dooom Posted March 8, 2014 Share Posted March 8, 2014 yup - loading and unloading works... I also note the callspawn logistics appears borked too. Any scuttlebutt on script fix? ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
WildBillKelsoe Posted March 8, 2014 Share Posted March 8, 2014 you should probably PM this fellow AWAITING ED NEW DAMAGE MODEL IMPLEMENTATION FOR WW2 BIRDS Fat T is above, thin T is below. Long T is faster, Short T is slower. Open triangle is AWACS, closed triangle is your own sensors. Double dash is friendly, Single dash is enemy. Circle is friendly. Strobe is jammer. Strobe to dash is under 35 km. HDD is 7 times range key. Radar to 160 km, IRST to 10 km. Stay low, but never slow. Link to comment Share on other sites More sharing options...
dooom Posted March 9, 2014 Share Posted March 9, 2014 done ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 "This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL Link to comment Share on other sites More sharing options...
Recommended Posts