Script/CreatureGroup
From SF3
class CreatureGroup
Interface to give coordinated commands to a selected group of creatures.
Class Methods
| [constructor] | CreatureGroup (LevelReference&in _Level) |
| create an empty creature group. | |
| [constructor] | CreatureGroup (LevelReference&in _Level, const Creature[]&in _Creatures) |
| create a creature group using the given creatures. | |
| [constructor] | CreatureGroup (const CreatureGroup&in _Other) |
| copy data from the given creature group. | |
| [constructor] | CreatureGroup () |
| default constructor. NEVER USE THIS! this constructor only exists because AngelScript requires it. | |
| uint8 | GetFaction () const |
| get the faction of the creatures in the group. may return kMaxFactions if the group is empty. | |
| Creature[]@ | GetCreatures () const |
| get a list of creatures currently in the group | |
| bool | IsMember (const Creature&in _Creature) const |
| check if the given creature is a member of this group | |
| void | Add (const Creature&in _Creature) |
| add a creature to the selection | |
| void | Set (const Creature[]&in _Creatures) |
| assign a new set of creatures to the selection, replacing any previous ones. | |
| void | Remove (const Creature&in _Creature) |
| remove the given creature from the selection | |
| void | Clear () |
| remove all creatures from the selection | |
| void | SetControllable (const bool _bControllable) |
| make creatures in this group controllable by the player (or not) | |
| void | FollowPath (const string&in _sPathName, const bool _bForward, const bool _bQueued = false, const bool _bWalk = false) |
| make the creatures walk along the given path (will first go to the closest point on the path and then follow from there) | |
| void | FollowPathFromBeginning (const string&in _sPathName, const bool _bForward, const bool _bQueued = false, const bool _bWalk = false) |
| make the creature walk along the given path (will go to the first point of the path and then follow from there) | |
| void | FollowPathWait (const string&in _sPathName, const bool _bForward, const bool _bFromBeginning, const uint8 _WaitForHeroesFaction, const EFollowPathWaitMode _WaitMode, const bool _bQueued = false, const bool _bWalk = false) |
| make the creature walk along the given path, but wait for heroes of the given party to be nearby before continuing to the next waypoint | |
| void | FollowPathSmooth (const string&in _sPathName, const bool _bForward, const bool _bFromBeginning = true, const uint8 _WaitForHeroesFaction = kMaxFactions, const EFollowPathWaitMode _WaitMode = WaitForAnyHeroes, const bool _bQueued = false, const bool _bWalk = false) |
| same as FollowPathWait, but creatures will not stop at every waypoint. may cause creatures to get spread over long distances. | |
| void | Patrol (const string&in _sPathName, const bool _bPingPong, const bool _bForward, const bool _bSmooth, const bool _bQueued = false, const bool _bWalk = false) |
| make the group continuously patrol along the given path. if _bPingPong is true, the group will alternate between walking the path forward and backward. otherwise, it will start over from the beginning after reaching the end. | |
| void | FollowCreature (const Creature&in _Creature, const uint _uMaxDistance = 80, const uint _uMinDistance = 20, const bool _bQueued = false, const bool _bWalk = false) |
| follow the given creature, trying to stay within the given distance from it | |
| void | Move (const Entity&in _Target, const bool _bQueued = false, const bool _bSameSpeed = false, const bool _bWalk = false) |
| move to the CURRENT position of the given entity | |
| void | Move (const Position&in _Target, const bool _bQueued = false, const bool _bSameSpeed = false, const bool _bWalk = false) |
| move to the CURRENT position of the given entity | |
| void | Teleport (const Entity&in _Target, const bool _bQueued = false) |
| teleport selection to the target position | |
| void | Stop () |
| stop whatever you are doing. for obvious reasons, this one can't be queued. | |
| void | HoldPosition (const bool _bQueued = false) |
| let the creatures stop and hold their position wherever they are at the moment | |
| void | AttackPosition (const Entity&in _Target, const bool _bQueued = false, const bool _bWalk = false) |
| attack the general area around the given entity | |
| void | AttackPosition (const Position&in _Target, const bool _bQueued = false, const bool _bWalk = false) |
| attack the general area around the given entity | |
| void | AttackEntity (const Entity&in _Target, const bool _bQueued = false) |
| attack the given entity | |
| void | Cast (const string&in _sSpellName, const Entity&in _Target, const bool _bQueued = false) |
| cast a spell at the given target (_Target may be Entity()/invalid if the spell is self-cast) | |
| void | Die (const bool _bQueued = false) |
| kill all creatures in the group | |
| void | BuildSectorCenter (const uint16 _uSectorIndex, const bool _bQueued = false) |
| build a sector center in the given sector. may fail if there is already a sector center present. requires at least one hero to be in the selection. | |
| CreatureGroup& | operator= (const CreatureGroup&in _Other) |