List (EM4)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

Information: The EMERGENCY community board is completely free and is financed by advertisement. Please deactivate adblocker if you use this site. Thank you!

  • Namespace / class 'List'
    List are responsible for searching and save actors in lists. You can take single actors from the lists and control them by scripts.

    If you create a list without any further definitions, the list will load all objects from the EMERGENCY 4 modification, this costs very much performance. For this reason, you can define what kind of actors lists should search. The following list searchs only objects, which have the name 'engine'.

    Source Code

    1. GameObjectList("engine");


    Defined lists


    Source Code

    1. class Actor;
    2. class GameObject;
    3. class Vehicle;
    4. class Person;
    5. class OpenHouse;
    6. class Path;
    7. class SpawnPoint;
    8. enum PersonRole;
    9. enum VehicleType;


    List ActorList


    Source Code

    1. class ActorList
    2. {
    3. public :
    4. ActorList();
    5. ActorList(const char *Name_);
    6. ActorList(const ActorList &Copy_);
    7. ActorList(ActorType type_);
    8. ~ActorList();
    9. inline int GetNumActors() const { return mNumActors; }
    10. Actor *GetActor(int Index_) const;
    11. const ActorList& operator=(const ActorList &Copy_);
    12. };
    Display All


    List GameObjectList


    Source Code

    1. class GameObjectList
    2. {
    3. public :
    4. GameObjectList();
    5. GameObjectList(const char *Name_);
    6. GameObjectList(const GameObjectList &Copy_);
    7. GameObjectList GetGameObjects();
    8. GameObjectList GetGameObjects(GameObjectType type_);
    9. GameObjectList GetGameObjects(const char *Name_);
    10. GameObjectList GetGameObjectsWithPrefix(const char* Prefix_);
    11. GameObjectList GetSelectedGameObjects()
    12. ~GameObjectList();
    13. inline int GetNumObjects() const { return mNumObjects; }
    14. GameObject *GetObject(int Index_) const;
    15. int GetNumBurningObjects() const;
    16. int GetNumObjectsWithStatus(int status_);
    17. bool ContainsSquad() const;
    18. bool ContainsNonSquad() const;
    19. bool ContainsPoliceSquad() const;
    20. const GameObjectList& operator=(const GameObjectList &Copy_);
    21. };
    Display All


    List PersonList


    Source Code

    1. class PersonList
    2. {
    3. public :
    4. PersonList();
    5. PersonList(const char *Name_);
    6. PersonList(PersonRole role_);
    7. PersonList(const PersonList &Copy_);
    8. ~PersonList();
    9. inline int GetNumPersons() const { return mNumObjects; }
    10. Person *GetPerson(int Index_) const;
    11. const PersonList& operator=(const PersonList &Copy_);
    12. };
    Display All


    List VehicleList


    Source Code

    1. class VehicleList
    2. {
    3. public :
    4. VehicleList();
    5. VehicleList(const char *Name_);
    6. VehicleList(VehicleType min_, VehicleType max_); // only vehicles with types in given range (inclusive min and max)
    7. VehicleList(const VehicleList &Copy_);
    8. ~VehicleList();
    9. inline int GetNumVehicles() const { return mNumObjects; }
    10. Vehicle *GetVehicle(int Index_) const;
    11. const VehicleList& operator=(const VehicleList &Copy_);
    12. };
    Display All


    List FireObjectList


    Source Code

    1. class FireObjectList
    2. {
    3. public :
    4. FireObjectList();
    5. FireObjectList(const char *Name_);
    6. FireObjectList(const FireObjectList &Copy_);
    7. ~FireObjectList();
    8. inline int GetNumFireObjects() const { return mNumObjects; }
    9. FireObject *GetFireObject(int Index_) const;
    10. const FireObjectList& operator=(const FireObjectList &Copy_);
    11. };
    Display All


    List OpenHouseList


    Source Code

    1. class OpenHouseList
    2. {
    3. public :
    4. OpenHouseList();
    5. OpenHouseList(const char *Name_);
    6. OpenHouseList(const OpenHouseList &Copy_);
    7. ~OpenHouseList();
    8. inline int GetNumOpenHouses() const { return mNumObjects; }
    9. OpenHouse *GetOpenHouse(int Index_) const;
    10. const OpenHouseList& operator=(const OpenHouseList &Copy_);
    11. };
    Display All


    List PathList


    Source Code

    1. class PathList
    2. {
    3. public :
    4. PathList();
    5. PathList(const char *Name_);
    6. PathList(const PathList &Copy_);
    7. ~PathList();
    8. inline int GetNumPaths() const { return mNumObjects; }
    9. Path *GetPath(int Index_) const;
    10. const PathList& operator=(const PathList &Copy_);
    11. };
    Display All


    List SpawnPointList


    Source Code

    1. class SpawnPointList
    2. {
    3. public :
    4. SpawnPointList();
    5. SpawnPointList(const char *Name_);
    6. SpawnPointList(const SpawnPointList &Copy_);
    7. ~SpawnPointList();
    8. inline int GetNumSpawnPoints() const { return mNumObjects; }
    9. SpawnPoint *GetSpawnPoint(int Index_) const;
    10. const SpawnPointList& operator=(const SpawnPointList &Copy_);
    11. };
    Display All

    950 times viewed