Jump to content

Deploy troops anywhere with the Huey, possible?


Robert1983NL
 Share

Recommended Posts

Hey guys,

 

I wanna simulate carrying troops in my Hueys which I can drop off anywhere I want to, not at a predetermined location. I want to be able to block a driving car, so that it stops, then another Huey lands behind it and drops off troops. Since it's a driving car, the troop drop off location can be anywhere you stop the car. Is this possible to create in the Mission Editor?

Link to comment
Share on other sites

  • ED Team

dont think it is possible at the moment :(

 

unless the script gurus have an answer :)

smallCATPILOT.PNG.04bbece1b27ff1b2c193b174ec410fc0.PNG

Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status

Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, HP Reverb G2

Link to comment
Share on other sites

You must make a trigger point have the units placed where u want to land , check the late activation box for that unit. Click the trigger button, select new, once none, then the next box select new, group inside zone (your huey) the new again, select units airspeed is lower than 1, click new again units vertical speed is at -1 and +1 then click new select units altitude is lower than 1 then the next box (Actions) click new Group activate select the troops that u place at the LZ. then select new, set internal cargo at 0 to simulate the troops exited if you want have a message pop up so you know it works properly. NOTE: unit for the chopper is defaulted with the name PILOT 1 for the player and to make it easier name all your units so it is easier like the troops you want to drop name them Troops LZ insert 1 or something along those lines. Your going to need about 2-3 trigger points to do it properly from the moment you take off to land its easier to have an enemy group to be destroyed then have a friendly spawn in after to pop the smoke.

 

Hope this helped! And wasn't to confusing! WHOOP WHOOP WHOOP!!!!!

 

P.s. Have one unit on the ground that is visible and set a trigger as soon as he enters the spot and have him toss smoke so u can see the LZ. Make sure you make a trigger point for the mission start to set internal cargo to the weight u want so it can simulate a full load before you make your drop.

 

 

As for the car being blocked by troops just make a trigger using the same method as said unit reaches certain point another unit spawns creating a road block on the road ahead of the car. Also if you are using a civ traffic car the car will not stop you have to use a vehicle out of the drop boxes.


Edited by [Knight]
Link to comment
Share on other sites

I am banging my head against a wall here... And no, not at the op... just at myself.

 

Am I mistaken in that we can deploy groups / units in a zone randomly? If you can (and I'm quite sure you can) then perhaps it is possible to make the zone within which the unit / group is spawned a moving one. If the moving zone is centered around the chopper then you could set the unit to spawn within that zone, and also set the vehicle to "AI Task Push" when it enters the zone. Condition may need to be that the chopper is at low level and not moving (set in conditions unit lower than and slower than).

 

Now then, how to get them BACK to the chopper- not 100% sure... except that you may be able to "Pilot can control" AI troops back and deactivate them once a certain flag has been hit (unit in zone for 2 minutes sets flag... then a time since flag 2 minutes as the troops are directed back to the helicopter. They may have to stand around for a minute before deactivated and taken out of the picture.

 

Yes? No?

"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

Yes, very possible without using scripts, you need to have the unit already in position on the ground (late activation) and when the UH1H lands they the are made active.

 

Yeah I know, but I want it to be ANY location, not a previously determined one.

Link to comment
Share on other sites

You must make a trigger point have the units placed where u want to land , check the late activation box for that unit. Click the trigger button, select new, once none, then the next box select new, group inside zone (your huey) the new again, select units airspeed is lower than 1, click new again units vertical speed is at -1 and +1 then click new select units altitude is lower than 1 then the next box (Actions) click new Group activate select the troops that u place at the LZ. then select new, set internal cargo at 0 to simulate the troops exited if you want have a message pop up so you know it works properly. NOTE: unit for the chopper is defaulted with the name PILOT 1 for the player and to make it easier name all your units so it is easier like the troops you want to drop name them Troops LZ insert 1 or something along those lines. Your going to need about 2-3 trigger points to do it properly from the moment you take off to land its easier to have an enemy group to be destroyed then have a friendly spawn in after to pop the smoke.

 

Hope this helped! And wasn't to confusing! WHOOP WHOOP WHOOP!!!!!

 

P.s. Have one unit on the ground that is visible and set a trigger as soon as he enters the spot and have him toss smoke so u can see the LZ. Make sure you make a trigger point for the mission start to set internal cargo to the weight u want so it can simulate a full load before you make your drop.

 

 

As for the car being blocked by troops just make a trigger using the same method as said unit reaches certain point another unit spawns creating a road block on the road ahead of the car. Also if you are using a civ traffic car the car will not stop you have to use a vehicle out of the drop boxes.

I'm trying this now... How do I have the troops that I 'have on board' group activate right near the Huey?

Link to comment
Share on other sites

Is there any documentation for the data format that coalition.addGroup uses? I guess that's the big question on getting troops spawning around a Huey without use of predefined trigger zones.

 

From Psyrixx code example I take that it is a rather complex structure, looks like a dump of a game internal object.

Link to comment
Share on other sites

coalition.addGroup has the ability to spawn unit groups dynamically, anywhere, anytime, with any properties. It is perfect for UH-1 insertion missions. I had a code example somewhere where I tested it. When I get done with what I need to do for Slmod, I'll post it.

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

In desperate need for someone to help me with a mission. Mission is completed but have trouble inserting 2 groups and 1 extraction. If you think you can fix this, please PM me so I can send you the mission.

 

Thanks in advance.

Midnite Signature.jpg

552334314_MidniteSignature.jpg.7c1678ea5639bd6d044b092eb97c300e.jpg

Link to comment
Share on other sites

Attached is an example mission with dynamic spawn insertions using the Huey. Just land anywhere (even on top of buildings) and use the F10 radio menu to tell the soldiers to "get out". The script resets itself, so you can repeat landing and spawning to your heart's content.

 

Here is the script:

 

local rescue = Unit.getByName('Pontiac1'):getPosition().p

local data = {
["visible"] = false,
["groupId"] = math.random(10, 20),
["tasks"] = 
{
}, -- end of tasks
["hidden"] = false,
["units"] =
{
	[1] = 
	 {
           ["y"] = rescue.z - 4,
           ["type"] = "Soldier M4",
           ["name"] = string.char(math.random(35,80)),
           ["unitId"] = math.random(40, 50),
           ["heading"] = 0,
           ["playerCanDrive"] = true,
           ["skill"] = "Average",
           ["x"] = rescue.x + 7,
       }, -- end of [1]
       [2] = 
       {
           ["y"] = rescue.z - 6,
           ["type"] = "Soldier M4",
           ["name"] = string.char(math.random(15,55)),
           ["unitId"] = math.random(40, 50),
           ["heading"] = 0,
           ["playerCanDrive"] = true,
           ["skill"] = "Average",
           ["x"] = rescue.x + 9,
       }, -- end of [1]
   }, -- end of ["units"]
   --["y"] = 650342.85714286,
   --["x"] = -292285.71428571,
   ["name"] = string.char(math.random(65,90)),
   --["start_time"] = 0,
   --["task"] = "Ground Nothing",
} -- end of [1]

coalition.addGroup(country.id.USA, Group.Category.GROUND, data)

trigger.action.setUserFlag('1', false)

Huey Insertion Test.miz

  • Like 2
Link to comment
Share on other sites

Attached is an example mission with dynamic spawn insertions using the Huey. Just land anywhere (even on top of buildings) and use the F10 radio menu to tell the soldiers to "get out". The script resets itself, so you can repeat landing and spawning to your heart's content.

 

Here is the script:

 

local rescue = Unit.getByName('Pontiac1'):getPosition().p

local data = {
["visible"] = false,
["groupId"] = math.random(10, 20),
["tasks"] = 
{
}, -- end of tasks
["hidden"] = false,
["units"] =
{
	[1] = 
	 {
           ["y"] = rescue.z - 4,
           ["type"] = "Soldier M4",
           ["name"] = string.char(math.random(35,80)),
           ["unitId"] = math.random(40, 50),
           ["heading"] = 0,
           ["playerCanDrive"] = true,
           ["skill"] = "Average",
           ["x"] = rescue.x + 7,
       }, -- end of [1]
       [2] = 
       {
           ["y"] = rescue.z - 6,
           ["type"] = "Soldier M4",
           ["name"] = string.char(math.random(15,55)),
           ["unitId"] = math.random(40, 50),
           ["heading"] = 0,
           ["playerCanDrive"] = true,
           ["skill"] = "Average",
           ["x"] = rescue.x + 9,
       }, -- end of [1]
   }, -- end of ["units"]
   --["y"] = 650342.85714286,
   --["x"] = -292285.71428571,
   ["name"] = string.char(math.random(65,90)),
   --["start_time"] = 0,
   --["task"] = "Ground Nothing",
} -- end of [1]

coalition.addGroup(country.id.USA, Group.Category.GROUND, data)

trigger.action.setUserFlag('1', false)

 

There's a big problem with that code- your unitId could be a duplicate of a current unit, or the two unitIds could be the same. You do not want to use math.random to generate the unitId, the unitId needs to be generated based off of units currently alive in the game world, and needs to be a unique value that no other unit has. Also, the name needs to be unique too, and it is randomized here also.

 

It may be you do not need to even specify a unitId, that the game will assign one automatically, but I would need to check on that.

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

You don't need Mist (coalition.addGroup is part of ED Scripting Engine)

Put this code into any empty file, and call it with Do Script File.

 

Thanks man, must say I feel as intimidated by this LUA as the first time I used DOS. All we need now is a "Windows" program that makes writing LUA more understandable.!:(

Midnite Signature.jpg

552334314_MidniteSignature.jpg.7c1678ea5639bd6d044b092eb97c300e.jpg

Link to comment
Share on other sites

Oh no. Let us the ability to generate powerful stuff with a few command lines into a text file.

 

If you want GUI, ME is quite good.... but I want to avoid spending time into the GUI, so I am writing functions instead, to write once and reuse forever.

 

E.g.: I love to add AWACS with escort..... I write a function that will add automatically some AWACS + escort from the closest Airbase when the mission contains a trigger zone called "AWACS" (this zone will be the orbit circle). I will pass the airplane type and the orbit altitude as parameters. Among others.


Edited by galevsky06
Link to comment
Share on other sites

Huey transporting script

 

Here's a transporting script/mission I did for my squad. You pick up infantry at the FARP and unload them anywhere you want. Has been pretty thoroughly tested in MP and seems to work. Currently uses Georgian infantry cause the mission needed RPGs but you can have a look and change that. Let me know how it works for you!

 

Heres a video demo (@ around 7 mins):

(I can't embed, help me!)

[url=

][/url]

Huey transport template.miz

DisembarkScript.lua


Edited by RagnarDa

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

I look forward to the day one of you brains figure this all out..

 

I would assume after you drop them off you would want them to have WAYPOINTS attached as well so they could move out and into battle..

is that being tested as well? or just stay in the place you drop them?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...