Complete Transport and Logistics Deployment - CTLD - Page 85 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 04-19-2018, 03:48 AM   #841
flanker0ne
Senior Member
 
flanker0ne's Avatar
 
Join Date: Oct 2009
Location: Rome Italy
Posts: 1,279
Default

Quote:
Originally Posted by edokg View Post
Hi Ciribob, I've tested the new script and it seems to forks fine! I'll do more tests next days and I'll report you.

A question, is there a simple way to "extend" the minimum distance also to Troop Transport?

Tks!
If I understand your question, the troop load and unload distance, depend from the trigger zone radius you created in the editor

Inviato dal mio SM-G930F utilizzando Tapatalk
__________________
AMVI Forum , Youtube Channel , Facebook Page

Last edited by flanker0ne; 04-19-2018 at 03:50 AM.
flanker0ne is offline   Reply With Quote
Old 04-19-2018, 08:03 AM   #842
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,800
Default

Quote:
Originally Posted by 75th-VFS-Striker View Post
I can't get a Hawk battery set up. I've looked through all the documentation a bunch of times and can't figure out this problem. I remember there being a minimum distance from the logistics but can't find that in the lua. I have all the necessary pieces to set it up. Can someone explain what I'm doing wrong? Do you need a zone? I thought you could deploy them anywhere.
For a hawk battery you need all 4 crates to piece them together.

The minimum deploy distance is near the top of the script - search minimum and you should find it near the top

If you want to try an older version : https://github.com/ciribob/DCS-CTLD/releases/tag/1.72

This one doesn't have deploy distance limitations, only that you can deploy where you pick up crates.

Can you post your mission and I'll take a look when I'm back? Away from today till Monday



Sent from my ONEPLUS A3003 using Tapatalk
__________________
Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD
CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup
Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required!
DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord
Ciribob is offline   Reply With Quote
Old 04-28-2018, 10:52 PM   #843
Alpenwolf
Senior Member
 
Alpenwolf's Avatar
 
Join Date: Feb 2015
Posts: 1,319
Default

How can I force capturing an airbase while being dependent on deploying troops on that airbase?

Say you destroy the enemy's air defences at an airbase and set "Group DEAD" as the condition while the enemy's air defences group's name is selected before the air defences belonging to your coalition can spawn and thus capture the airbase. Now I'd like to add to that condition another one that connects deploying troops on that airbase with capturing it. Obviousley there is no condition that says "When Unit Type in ZONE" so that I could select "Infantry M4" as the type to make capturing an airbase dependent on whether there are any infantries on the ground or not. Is there any condition or a way around to make CTLD a vital criteria for capturing airbases?
Alpenwolf is offline   Reply With Quote
Old 05-10-2018, 06:32 PM   #844
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,800
Default

Quote:
Originally Posted by Alpenwolf View Post
How can I force capturing an airbase while being dependent on deploying troops on that airbase?

Say you destroy the enemy's air defences at an airbase and set "Group DEAD" as the condition while the enemy's air defences group's name is selected before the air defences belonging to your coalition can spawn and thus capture the airbase. Now I'd like to add to that condition another one that connects deploying troops on that airbase with capturing it. Obviousley there is no condition that says "When Unit Type in ZONE" so that I could select "Infantry M4" as the type to make capturing an airbase dependent on whether there are any infantries on the ground or not. Is there any condition or a way around to make CTLD a vital criteria for capturing airbases?
Sorry for the long reply - unfortunately there isn't an easy answer:

Code:
            local _zone = trigger.misc.getZone("zoneName")

            _zone.point = mist.utils.makeVec3GL(_zone.point)

            local _volume = {
                id = world.VolumeType.SPHERE,
                params = {
                    point = _zone.point, 
                    radius = _zone.radius
                }
            }

            local _listRed = {} -- contains red units
            local _listBlue = {} -- contains blue units

            local _foundRed = false
            local _foundBlue = true

            local _search = function(_unit, _coa)
                pcall(function()
                

                    if _unit ~= nil
                            and _unit:isExist()
                            and _unit:isActive()
                            and _unit:getLife() > 0
                            and not _unit:inAir()
                             then

                        if _unit:getCoalition() == 1 then
                            _foundRed = true
                            table.insert(_listRed,_unit)
                        else
                            _foundBlue = true
                             table.insert(_listBlue,_unit)
                        end
                    end

                end)

                return true
            end

            world.searchObjects(Object.Category.UNIT, _volume, _search)


            if _foundRed then
                -- FOUND RED STUFF
            end

            if _foundBlue then
                -- FOUND BLUE STUFF
            end
The snippet above gets a zone called "zoneName" and tells you if any ground units are in the zone - with the width controlled by zone size in the editor

It'll also fill up a list of red and blue units in _listRed and _listBlue

You can go through those lists, and work out what kind of unit they are - to trigger capture

Details of what you can do with units are here: http://wiki.hoggit.us/view/DCS_Class_Unit

and to loop through a list

Code:
for _index, _element in pairs(_someList) do 

 --  do stuff with _element like getName
_element:getName()

end
Hope that helps! Sorry its not a simple answer

Code above can be executed in DO SCRIPT
__________________
Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD
CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup
Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required!
DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord
Ciribob is offline   Reply With Quote
Old 05-15-2018, 09:06 AM   #845
chrisofsweden
Member
 
chrisofsweden's Avatar
 
Join Date: Jan 2014
Posts: 468
Default

Hey Ciribob, if I haven't said it already, thanks for this magnificent script.

Bugreport (I think):

CTLD won't register a JTAC which has been respawned with mist.respawngroup.
Looks like line 4935 "if _jtacGroup == nil or #_jtacGroup == 0 then" in fact returns nil or 0.

Last edited by chrisofsweden; 05-17-2018 at 09:54 AM.
chrisofsweden is offline   Reply With Quote
Old 05-15-2018, 07:48 PM   #846
Alpenwolf
Senior Member
 
Alpenwolf's Avatar
 
Join Date: Feb 2015
Posts: 1,319
Default

Quote:
Originally Posted by Ciribob View Post
Sorry for the long reply - unfortunately there isn't an easy answer:
...


Hope that helps! Sorry its not a simple answer

Code above can be executed in DO SCRIPT
Been setting up triggers like crazy... by the hundreds with loads of flags to work my way around it and somehow made it partially work but should do the job
I'll try your method of course which is what I asked for.
Thanks for the reply and no need to apologise for replying so late after being one solid contributor to the community


God bless you!
Alpenwolf is offline   Reply With Quote
Old 05-17-2018, 09:51 AM   #847
chrisofsweden
Member
 
chrisofsweden's Avatar
 
Join Date: Jan 2014
Posts: 468
Default

I've set ctld.JTAC_lock = 'vehicle' but the JTAC Unit still
targets troops sometimes seemingly if a troops group are closer than a group containing vehicles. Is this by design or something not working correctly? JTAC status states it has visual on ATMZ-5 which is a truck in another group, but lasing Soldier AK.

Last edited by chrisofsweden; 05-17-2018 at 09:55 AM.
chrisofsweden is offline   Reply With Quote
Old 05-17-2018, 12:12 PM   #848
Alpenwolf
Senior Member
 
Alpenwolf's Avatar
 
Join Date: Feb 2015
Posts: 1,319
Default

Tried a couple of things with what you've posted above but it's obviousley harder than I thought for me:

I created a simple mission where one should take the Ka-50 (Blue) at a FARP (hot start), pick up a Vulcan, fly 3 km to the north, destroy 1 Red ground unit, land and deploy the Vulcan. Now this should complete the capture and the Blue ground unit should spawn to capture the base. The last part doesn't work...

If it's not too much work for you could you please check it out?
Attached Files
File Type: miz Test Drop To Capture.miz (100.2 KB, 12 views)
Alpenwolf is offline   Reply With Quote
Old 05-25-2018, 10:32 AM   #849
edokg
Junior Member
 
edokg's Avatar
 
Join Date: Jul 2017
Location: Italy
Posts: 98
Default

Quote:
Originally Posted by Ciribob View Post
New version of the CTLD Script v.1.73

Make sure you have the latest MIST !
  • Optional minimum distance from friendly Logistics added

Edit the line below in the CTLD.lua to change the minimum distance in meters a crate must be from a friendly logistics zone in order to unpack a crate

Code:
ctld.minimumDeployDistance = 1000 -- minimum distance from a friendly pickup zone where you can deploy a crate
Please see Readme and Github for latest code and how to use

Link:https://github.com/ciribob/DCS-CTLD


Examples:http://forums.eagle.ru/showthread.php?p=2621619

As always, please let me know if you have any issues or suggestions!

*** FOR 2.5+: Make sure all human players are in separate groups / flights ***



Hi Ciribob, I've tested the script a lot and it works fine.
There is only one problem in my opinion.


If I have one logistic in A and one in B, if I take a crate in A, I'll not be able to unpack it near A but is important that I can unpack it near B (to reinforce a base for example)...


Now, if I take crate in A I can't unpack it also near B (because there is a logistic also in B)...


Can you solve it?
__________________

https://forums.eagle.ru/signaturepics/sigpic128931_4.gif

SO:
Win10 64bit CPU:Intel i7 8700K@3.7 RAM:DDR4 46GB G.Skill Trident 3200MHz CL14 GPU:Nvidia EVGA GTX1080Ti FTW iCX MB:ASRock Z370 Extreme4 HDD:
512GB Samsung 970 PRO SSD M.2 NVMe + 250GB Samsung 850 EVO SSD + 2x500GB Seagate Barracuda 7200RPM
edokg is offline   Reply With Quote
Old 05-27-2018, 02:56 AM   #850
Nealius
Senior Member
 
Join Date: Feb 2013
Location: Tokyo
Posts: 2,470
Default

Is there an ELI5 for running this? I want to force JTAC to IR Point a target at night, but I can't figure out how to use this script to do it. The "Intro to Lua Scripting" tutorial here on the forums isn't helping much either. Totally lost.
__________________
YouTube Channel: "Clutch"

ASUS Z170 | i5-7600 | GTX1050Ti | 16GB DDR4 | Windows 10
Nealius is offline   Reply With Quote
Reply

Tags
ctld, ctts, huey, mi-8, mi8, sling loading

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 01:33 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.