Notices

Reply
 
Thread Tools Display Modes
Old 06-18-2013, 10:25 PM   #1
geloxo
Member
 
Join Date: Feb 2009
Posts: 103
Reputation power: 8
geloxo is on a distinguished roadgeloxo is on a distinguished road
Default Complete transport script

Hi,

I made a new script based on Deck´s HueyDrop2 script (all credits to him for the original idea) that extends the functionallity much more, allowing both human and AI units to drop troops. Also logistics are incorporated so you can transport equipment as well. It´s compatible with air and ground forces (even controlled by players via Combined Arms addon).

Important:

Remember to reload script on the mission editor everytime you change the configuration.

Features:

Complete Troops Transport Script (CTTS) v1.04 (Original version)
Updating to latest DCS release by Ciribob also attached in this post

TROOPS TRANSPORTATION

- Script is compatible with both air and ground transports controlled by players or AI
- Transports will drop troops types based on the coalition they belong to and the number of previously loaded troops
- Typically the troops are loaded inside a pickup trigger and dropped inside a drop trigger, but usage of triggers is not mandatory
- Pickup and drop smoke markers can be enabled, disabled and their colours configured
- To enable a UNIT to use the transport script set its UNITNAME in the list of transports names or use any of the predefined ones in your mission
- To manually define a GROUP as extractable add its GROUPNAME to the list of extractable groups or use any of the predefined ones in your mission
- Dropped troops will stay close to drop point or go to closest enemy position (default 2000m)
- Human players need to use F10 radio action to load/unload troops or to check the cargo status
- Players can only load troops inside the pickup trigger or alternatively load any pre-defined extractable group or spawned group everywhere. In both cases you can drop them everywhere
- Troops can be extracted by players if transport is near their current position (default 50m)
- Troops can be returned to pick zones by players (acting as Medevacs, for instance)
- AI transports will automatically load troops only when inside the pickup triggers. AI transports won´t extract any unit automatically (to avoid interferences with human players)
- AI transports will automatically unload troops only if they are close enough to drop triggers center (default 500m for ground units and 10km for air units). This allows AI ground units to enter triggers without dropping
- Ground Commander take control of AI transports via Combined Arms module and manually load and unload troops with them (this will disable the auto load/unload feature for the AI transport)
- Ground Commander can move any of the deployed troops manually in the field

LOGISTICS

- Human players can load equipment when close to any logistics supplier group from their coalition and deploy it everywhere
- Any human controlled transport enabled for troops transportation will be automatically enabled for logistics as well (AI transports do not support logistics, cause it´s useless in this case)
- To manually define a GROUP as logistics supplier add its GROUPNAME to the list of logistics groups or use any of the predefined ones in your mission
- An extractable group of troops can be used as logistics as well (by setting the same name in both lists)
- Deployed logistic items can be transported by any coalition (you can steal the enemy ones)
- There´s no need to define logistic items in mission. You need to spawn them with the standalone function (this is used to keep consistency between cargo 3D models)

Notes:

1. It´s NOT MANDATORY to place in mission any pickup or drop triggers as you can always use extractable units instead or pre-load transports with troops manually. ONLY if you are using AI transports you need at least ONE DROP trigger to perform the automatic unload. You can use any of the predefined names for triggers or use your own ones.

2. Predefined extractable groups can be used to trigger actions during mission as their groupnames will be kept during the mission when transported by human players

3. To pre-load units with troops during mission call at least 10s after mission started via DoScript action the following standalone function:

Code:
LoadTransport("unitName", number)
 
Where:
 - "unitname" = the name of the transport
 - number = optionally the number of troops.
 
Examples:
a. LoadTransport("helicargo1") This will load with default number of troops the unit "helicargo1"
b. LoadTransport("helicargo1",4) This will load it with 4 troops
As an alternative to this you can always use a AI transport that enters a pickzone to load them automatically

4. You can generate groups of extractable units during mission, that will search for enemy as well, using the following standalone function:

Code:
CallSpawn("groupside", number, "triggerName", radius)
 
Where:
 - "groupside" = "ins" for insurgents, "red" for Russia and "blue" for USA
 - number = number of groups to spawn
 - "triggerName" = trigger to use as spawn
 - radius = random distance for units to move from spawn zone (0 will leave troops at the spawn position - no search for enemy)
 
Example: CallSpawn("red", 2, "spawn1", 1000) This will spawn 2 groups of russians at trigger "spawn1" and they will search for enemy or move randomly withing 1000m
5. You can check the amount of extracted units inside a particular trigger using the following standalone function:
Code:
 
CountExtracted("triggerName", flagBlue, flagRed)
 
Where:
- "triggerName" = name of trigger to supervise
- flagBlue = userflag to count the number of blue units inside trigger
- flagRed = userflag to count the number of red units inside trigger
 
Example: CountExtracted("trigger1", 200, 201) this will count the units inside "trigger1" and store the values in the flags 200 and 201 (which can be accessed during mission)
6. You can generate logistic items on the field during mission using the following standalone function:
Code:
 
CallSpawnLogistics("groupside", number, "triggerName", radius)
 
Where:
"groupside" = "ins" for insurgents, "red" for Russia "blue" for USA
number = number of items to spawn
"triggerName" = trigger name in mission editor between commas
radius = separation between items
 
Example: CallSpawnLogistics("blue", 2, "spawn1", 30) this example will spawn 2 cargo items for USA at trigger "spawn1" separated 30m
7. You can check the amount of logistics dropped items inside a particular trigger using the following standalone function:
Code:
 
CountLogistics("triggerName",flagLog)
 
Where:
"triggerName" = name of trigger to supervise
flagLog = userflag to count the number of logistic items inside trigger
 
Example: CountLogistics("trigger1",300) this will count the items inside "trigger1" and store the values in the flag 300 (which can be accessed by mission)
8. Always RELOAD SCRIPT in mission after any changes on its configuration

Example mission included.

Also CTTS includes a new standalone set of functions for radio transmissions. Use them to configure radio beacons with periodical recall for JIP or to send messages without any group configuration on the editor.

RADIO AM/FM TRANSMISSION CONFIGURATION

I prefer this scripted approach due to its flexibility and to avoid loosing your configurations in case unit is deleted by mistake (as it happened to me..). If the soundfiles you want to use where not present in the .miz file add them manually to it and then open the mission in editor later on.

Code:
 
Examples:
 
RadioAM("huey1", 226, "Atmospheric.ogg", "Information") this will send a message with subtitles "Information" from huey1 on freq 226 AM (UHF)
RadioFM("huey1", 30, "Atmospheric.ogg", "Information") this will send a message with subtitles "Information" from huey1 on freq 30 FM
BeaconAM("huey1", 117, "Atmospheric.ogg") this will set an AM beacon on huey1 on freq 117 AM (VHF)
BeaconFM("huey1", 40, "Atmospheric.ogg") this will set a FM beacon on huey1 on freq 40 FM
RadioHQ("huey1", 118, "Atmospheric.ogg", "Information") this will send a periodical message with subtitles "Information" from huey1 on freq 118 FM
I hope you like it
Attached Files
File Type: lua CTTS.lua (55.6 KB, 1216 views)
File Type: miz Transport Tutorial.miz (26.3 KB, 988 views)
File Type: zip CTTS_CiribobEdit.zip (38.6 KB, 380 views)

Last edited by geloxo; 03-17-2015 at 05:18 PM.
geloxo is offline   Reply With Quote
Old 06-19-2013, 08:51 AM   #2
tintifaxl
Member
 
Join Date: Mar 2009
Posts: 911
Reputation power: 11
tintifaxl is a jewel in the roughtintifaxl is a jewel in the roughtintifaxl is a jewel in the roughtintifaxl is a jewel in the roughtintifaxl is a jewel in the roughtintifaxl is a jewel in the roughtintifaxl is a jewel in the rough
Default

Thanks for this. This will make mission creation much easier, me thinks.
__________________
Windows 10 64bit, Intel i5-4690@3.4Ghz, 24 Gig RAM, AMD 290x mobile, 1 TB fusion drive, 5k 27" monitor.
tintifaxl is offline   Reply With Quote
Old 06-19-2013, 09:41 AM   #3
mwd2
Senior Member
 
mwd2's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 1,687
Reputation power: 14
mwd2 is just really nicemwd2 is just really nicemwd2 is just really nicemwd2 is just really nicemwd2 is just really nicemwd2 is just really nicemwd2 is just really nicemwd2 is just really nicemwd2 is just really nice
Default

can you post the minium setup (helicopter names, Trigger zones, etc...) for the mission, which work with the script?
__________________
Waiting for:DCS Mi-24 Hind, ...
aka Ghost0815
"Do you know the way to Chak Chak?."
mwd2 is offline   Reply With Quote
Old 06-19-2013, 09:50 AM   #4
sorcer3r
Senior Member
 
sorcer3r's Avatar
 
Join Date: Mar 2011
Posts: 1,075
Reputation power: 12
sorcer3r is just really nicesorcer3r is just really nicesorcer3r is just really nicesorcer3r is just really nicesorcer3r is just really nicesorcer3r is just really nicesorcer3r is just really nicesorcer3r is just really nice
Default

nice. its also possible to pick up troops which where already dropped somewhere?
__________________
sorcer3r is offline   Reply With Quote
Old 06-21-2013, 12:34 PM   #5
geloxo
Member
 
Join Date: Feb 2009
Posts: 103
Reputation power: 8
geloxo is on a distinguished roadgeloxo is on a distinguished road
Default

Pick and drop and reinsert will be available. I made tests yerterday and plan to release a new version today or during weekend. This allows more teamwork in missions as one can be just moving troops to an intermediate point while others take those and insert them in front line. Also allows to change position of inserted troops on demand in case reinforcements are needed elsewhewe in the combat area
geloxo is offline   Reply With Quote
Old 06-21-2013, 08:04 PM   #6
geloxo
Member
 
Join Date: Feb 2009
Posts: 103
Reputation power: 8
geloxo is on a distinguished roadgeloxo is on a distinguished road
Default

First post updated and also example mission included (uploading to downloads too). Now you can extract previously inserted troops or return them to pick areas. Humans can deploy and extract troops everywhere (it´s not limited to drop areas only). AI still needs a drop trigger to perform the automatic unloading.

I decided not to add much more features cause I see this is quite complete as it is now and there are also other nice Medevac and CSAR scripts available that you can use for those purposes.

Happy transporting!
geloxo is offline   Reply With Quote
Old 06-21-2013, 11:23 PM   #7
Midnight
Member
 
Midnight's Avatar
 
Join Date: Jul 2012
Location: South Africa
Posts: 452
Reputation power: 6
Midnight has a spectacular aura aboutMidnight has a spectacular aura aboutMidnight has a spectacular aura aboutMidnight has a spectacular aura aboutMidnight has a spectacular aura about
Default

Nice work geloxo, was wondering if it would be possible to use "open doors" to trigger offload and pickup, instead of using radio command?
Midnight is offline   Reply With Quote
Old 06-21-2013, 11:48 PM   #8
geloxo
Member
 
Join Date: Feb 2009
Posts: 103
Reputation power: 8
geloxo is on a distinguished roadgeloxo is on a distinguished road
Default

Sure. If someone tells me the command in LUA I can check it. I honestly don´t know it
geloxo is offline   Reply With Quote
Old 06-23-2013, 12:32 AM   #9
shelt
Member
 
shelt's Avatar
 
Join Date: Mar 2011
Posts: 151
Reputation power: 6
shelt will become famous soon enoughshelt will become famous soon enoughshelt will become famous soon enough
Default

Nice script geloxo, and thanks for taking the time to do this.
I have used this in a mission and it works great.
How would one tweak the code to include additional pick-up points.
I have tried to copy and change the [1] and [2] code line with additional values of [3] and [4], but only the first smoke marker will show.
I am able to land in the added zone and load troops, but the smoke marker will only show for the first pick up point.

Code:
PickupZones = {
    [1] = {
        ZoneName = "Bluepickup",
        SmokeColor = trigger.smokeColor.Blue,
    },
    [2] = {
        ZoneName = "Bluepickup2",
        SmokeColor = trigger.smokeColor.Blue,
    },
    [3] = {
        ZoneName = "Redpickup",
        SmokeColor = trigger.smokeColor.Red,
    },
    [4] = {
        ZoneName = "Redpickup2",
        SmokeColor = trigger.smokeColor.Red,
    },
}
**EDIT** Not sure why but got it working now
__________________
Spoiler:
Intel i7-3770K,Windows 7 64,Noctua NH-U12S ,ASRock Z77 Extreme4 ,Corsair 16GB DDR3 1600,7970 3GBx2 Crossfire,ADATA XPG900x2 RAID 0, CM HAF XB Case,Thrustmaster Warthog,Combat Rudder Pedals,Logitech G930 with wireless TrackIR 5, 39" Insignia LED 120Hz Monitor

Last edited by shelt; 06-23-2013 at 05:01 AM. Reason: found solution
shelt is offline   Reply With Quote
Old 06-23-2013, 10:15 AM   #10
geloxo
Member
 
Join Date: Feb 2009
Posts: 103
Reputation power: 8
geloxo is on a distinguished roadgeloxo is on a distinguished road
Default

I simplified and expanded the configuration in the new Transport.lua regarding the original Hueydrop.lua to avoid mistakes. Don´t touch anything or add entries like that. Use the following method instead, and don´t forget the "" for the names.

To edit pick/drop zones change names and smoke colors here:
Code:
PickZones = {
"pickzone1", "blue",
"pickzone2", "blue",
"pickzone3", "none",
}
DropZones = {
"dropzone1", "red",
}
To disable or enable already configured smoke markers use:
Code:
smokepick = true
smokedrop = false
To edit human players pilot names:
Code:
HumanTransportsNames = {
"helicargo1",
"helicargo2",
"helicargo3",
"helicargo4",
...
}
And for AI transports:
Code:
 
AITransportsNames = {
"transport1",
"transport2",
"transport3",
"transport4",
...
}
Below that you don´t need to touch anything. It´s the pure content of the script itself.

But if it works for you now let it be anyway

Last edited by geloxo; 06-23-2013 at 10:23 AM.
geloxo is offline   Reply With Quote
Reply

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 03:00 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.