Difference between revisions of "DCS func setUnitInternalCargo"

From DCS World Wiki - Hoggitworld.com
 
Line 41: Line 41:
 
|optType2=
 
|optType2=
  
|examples= trigger.action.setUnitInternalCargo('Jek Porkins', 1000)
+
|examples= The following simulates what would happen if your momma was a passenger in the aircraft.
 +
 
 +
  local yoMomma= 5000
 +
  trigger.action.setUnitInternalCargo('Jek Porkins', yoMomma)
 +
 
 
|related=  
 
|related=  
 
[[DCS_singleton_trigger|'''Trigger Functions:''']] {{ListOfTriggerFuncs}}
 
[[DCS_singleton_trigger|'''Trigger Functions:''']] {{ListOfTriggerFuncs}}

Latest revision as of 08:02, 3 October 2022

Scripting Root

Envrioment: Mission Scripting
Function: setUnitInternalCargo Added with: 2.5.6
Member Of: trigger.action
Syntax: function trigger.action.setUnitInternalCargo(string unitName , number mass )
Description: Sets the internal cargo for the specified unit at the specified mass. Overrides any previously set value. Can be used in conjunction with troop transport to simulate cargo being added to the aircraft. Can be used on any unit object, however it only will impact airplanes and helicopters. Mass is defined in kilograms.


Return Value: function
Return Example: none
Examples: The following simulates what would happen if your momma was a passenger in the aircraft.
  local yoMomma= 5000
  trigger.action.setUnitInternalCargo('Jek Porkins', yoMomma)
Related Functions: Trigger Functions: ctfColorTag, getUserFlag, setUserFlag, getZone, explosion, smoke, effectSmokeBig, effectSmokeStop, illuminationBomb, signalFlare, radioTransmission, stopRadioTransmission, setUnitInternalCargo

outSound, outSoundForCoalition, outSoundForCountry, outSoundForGroup, outSoundForUnit, outText, outTextForCoalition, outTextForCountry, outTextForGroup, outTextForUnit

addOtherCommand, removeOtherCommand, addOtherCommandForCoalition, removeOtherCommandForCoalition, addOtherCommandForGroup, removeOtherCommandForGroup

markToAll, markToCoalition, markToGroup, removeMark, markupToAll, lineToAll, circleToAll, rectToAll, quadToAll, textToAll, arrowToAll, setMarkupRadius, setMarkupText, setMarkupFontSize, setMarkupColor, setMarkupColorFill, setMarkupTypeLine, setMarkupPositionEnd, setMarkupPositionStart

setAITask, pushAITask, activateGroup, deactivateGroup, setGroupAIOn, setGroupAIOff, groupStopMoving, groupContinueMoving

Notes: