Skip to content

Field manual / Level editor

hero — Party

The hero party: the selected hero, who is in the party, enabling and placing heroes, whether any hero has something.

Summary

hero::AnyInAreaTrue if at least one enabled and placed hero stands inside the zone's polygon (by background point).
hero::GetSelectedReturns the name of the currently selected hero.
hero::InPartyTrue if the hero is in the party (on the panel) and enabled.
hero::SetInPartyThe hero joins the party (1) or leaves it (0); outside_party is set to the opposite value.
hero::EnableAllEnables all heroes without the outside_party flag (party members).
hero::DisableOthersDisables all party heroes except the selected one.
hero::PlaceAllPlaces the heroes in the zone on floor 0 or 1 and moves the camera immediately.
hero::AnyHasItemTrue if the item's owner is a party hero.
hero::AnyHasAmmoTrue if any party hero has ammo for the weapon (the same check as in item::HasAmmo).

Functions

hero::AnyInArea(string) → bool

Classic: HeroInArea

True if at least one enabled and placed hero stands inside the zone's polygon (by background point).

hero::GetSelected() → string

Classic: GUI_GetSelectedHero

Returns the name of the currently selected hero.

hero::InParty(string) → bool

Classic: GUI_IsHero

True if the hero is in the party (on the panel) and enabled.

hero::SetInParty(string, int) → int

Classic: HERO_EnableEnumerate

The hero joins the party (1) or leaves it (0); outside_party is set to the opposite value.

hero::EnableAll() → int

Classic: EnableHeroes

Enables all heroes without the outside_party flag (party members).

hero::DisableOthers() → int

Classic: DisableHeroes

Disables all party heroes except the selected one. Right after level::Load it acts on the new level.

hero::PlaceAll(string, ?int) → int

Classic: PlaceHeroes

Places the heroes in the zone on floor 0 or 1 and moves the camera immediately. Returns 1; after level::Load it acts on the new level.

hero::AnyHasItem(string) → bool

Classic: AnyHero_HaveItem

True if the item's owner is a party hero.

hero::AnyHasAmmo(string) → bool

Classic: AnyHero_HaveAmmoForWeapon

True if any party hero has ammo for the weapon (the same check as in item::HasAmmo).