Jump to content

Recommended Posts

Posted

Is there any way with Dynamic Cargo to have it be detected by a zone script?  ie. Player spawns the dynamic cargo, but when they drop it off, I could use a script that it has been dropped of in a zone. 

The only function I can see in the ME is 'CARGO UNHOOKED IN ZONE' but it requires the name of the cargo for the script to work. If its Dynamic Cargo, there is no name. 

I'm trying to create a mission where the player must transport 10 units of cargo to a FARP (Specifically, trying to use the new UH-1H internal cargo added in the last patch). However, I can't figure out how to trigger a 'Mission Complete' when 10 units of cargo have been delivered. 

Thanks!

  • 1 month later...
Posted

You can use MOOSE events to catch when a Dynamic Cargo is loaded or unloaded:
👉 MOOSE Docs – OnEventDynamicCargoUnloaded

However, this approach has a drawback: all types of Dynamic Cargo will be processed, so you’ll need multiple if conditions to check for the correct delivery zone and the specific cargo models.

A much cleaner method is to use MOOSE SET_CARGO:

  • Apply filters to select the cargo types you want to track.

  • Use :ForEachCargo() to iterate over the active cargo objects.

  • For each cargo, check with :IsInZone() whether it’s inside the target zone.

  • If it is, increment a counter (counter = counter + 1).

This way, you can implement logic such as:

if counter >= 10 then 
  -- build FARP
end

⚠️ Remember to reset the counter every time you call the function to avoid counting the same cargo multiple times.

  • Recently Browsing   0 members

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