Prop.setCrateContent ▲ 10

Available from Easy Red 2 2.1.1

What the crate hands out instead of ammo: a list of item ids (weapons, ammo, equipment), one of each per use. An empty list brings back the usual ammo refill. Ids that do not exist or belong to a DLC the player does not own are skipped, with a note in the console.


Return value

Return TypeDescription
voidThis function doesn't return anything

Parameters

ParameterTypeDescription
1TableA list of item ids, for example { "ammo_30_06", "droppable_refill_crate" }.

Examples

A crate with its own content

-- on an ammo crate: it hands out these items instead of ammo, once a minute
myself:setCrateContent({ "ammo_30_06", "droppable_refill_crate" })
myself:setCrateDelay(60)

Back to Scripting API