Skip to content

SetHerbsEnabled

Switches a kind of herb off - or on again - on the whole level or within a circle.

Off, the plants of that kind are gone from every player’s world there and cannot be picked - a field kept bare, a forest without mushrooms. Without x, y and radius the whole level. A zone is a circle up to 5000 metres; switching the same kind off again at the same place changes the zone’s radius.

On again (enabled = true) switches back on every zone of that kind whose middle is within radius metres of x, y - without a place, every zone of the kind wherever it lies. The plants come back at once. Herbs a player picked are not affected: they still grow back on their own time.

SetHerbsEnabled(kind, enabled, x, y, radius)
Parameter Type
kind string the item name, its class GUID, or "*" for every kind
enabled boolean false switches them off, true on again
x number metres (optional)
y number metres (optional)
radius number metres (optional; 0 or none = the whole level)

true, or false and the reason

SetHerbsEnabled("*", false, 3080, 640, 120) -- no herbs in the town
SetHerbsEnabled("special_mushroomAmanita", false) -- no fly agaric anywhere
SetHerbsEnabled("*", true, 3080, 640) -- the town's back

GetHerbZones · TakeHerbs · the Herbs and mushrooms group of the index