Jump to content

Recommended Posts

Posted (edited)

Does anyone know if there is a way to name spawned cargo crates such that something appears next to the weight on the F6 radio menu?

 

The code I use is below and I tried adding a desc and description field but no luck.

 


   local _point = _heli:getPoint()
     local _static = {
           ["category"] = "Cargo",
           ["shape_name"] = "ab-212_cargo",
           ["type"] = "Cargo1",
           ["unitId"] = 10000,
           ["y"] = _point.z + 20,
           ["x"] = _point.x + 20,
           ["mass"] = 1500,
           ["name"] = "Cargo Test",
           ["description"] = "test",
           ["desc"] = "test2",
           ["canCargo"] = true,
           ["heading"] = 0,
       }

   coalition.addStaticObject(2, _static)

 

The Cargo object does have the method getCargoDisplayName() and this is used when building the menu in RadioCommandDialogsPanel.lua but I can't work out how to set the field.

 

Is there also a way to check if a heli is currently sling loading a crate?

Edited by Ciribob

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

  • Recently Browsing   0 members

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