List (EM4)

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

  • Namensraum / Klasse "List"
    Listen dienen dazu, alle „Actors“ in Listen zu suchen und zu speichern. Aus den erstellten Listen können einzelne Actors herausgenommen und per Script gesteuert werden.

    Eine Liste ohne nähere Definition lädt immer alle Objekte einer EMERGENCY 4 Modifikation und kostet daher sehr viel Rechenleistung. Aus diesem Grund lassen sich Listen genauer definieren. So sucht die nachfolgende Liste nur die Objekte, die den Namen „löschfahrzeug“ tragen:

    Source Code

    1. GameObjectList("löschfahrzeug");


    Definierte Listen

    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;


    Liste 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


    Liste 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


    Liste 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


    Liste 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


    Liste 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


    Liste 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


    Liste 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


    Liste 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

    1,194 times viewed