Jump to content

Hoppah

Members
  • Posts

    7,379
  • Joined

  • Last visited

  • Days Won

    284

Posts posted by Hoppah

  1. You can enter buildings with more FFs, select a group of them and click the building. Once a FF has entered the building you can't send more indeed. I did that on purpose because that might've made the script buggy. I'll rather go for the safe way. As for the second thing: I'll make some changes and release a second version tomorrow. Buildings not on fire, will not injure FF's or create victims. :)

    Thanks for the feedback.

    x


    When I grow up I wanna be like HOPPAH! (Dang, too late, too old now. Does young at heart count?) Man you have such AWESOME SKILLS! Thanks Hoppah!


    Aww, don't exaggerate now, it's a fairly simple script to add some more fun things.
     
  2. Hoppah presents the SearcHouse script

    Difficulty: Easy*

    *although scripting knowledge is required when you want to edit the random outcomes in the script.

    The modding concepts thread brought up the idea of searching non-open buildings and have a random outcome such as an injured civilian or an injured fire fighter. I liked the idea (for the US Army Modification) and started working on it and I'd like to share the result.

    What does the script do?

    It's a very simple script actually. I've incorporated the entire functionality in the EnterHouse script and there's no need to add new commands to your units Your units can only enter buildings where a child with the name "SearchHouse is present (see instructions). Just like the original EnterHouse.script you only have to click a (non-open-house type) building and your unit will approach the door and disappear for 30 seconds (time can be changed in the script). A fence will spawn in front of the building to remind you the building is being searched. After 30 seconds your unit will appear again, the fence will be deleted and a random outcome will be generated. The provided script has the following random outcomes (SearchHouse_v2: only for buildings on fire or burned down):

    • 30% chance that nothing has been found
    • 20% chance that a resident has been found and evacuated (will spawn a single civilian near the door)
    • 20% chance that your unit will get minor injuries (he will lose 90% of his health when the building is burning, otherwise 45% of his health)
    • 10% chance that your unit will get severly injured (he will be laying on the floor in front of the building)
    • 20% chance a victim has been found, the unit will spawn while carrying a victim.

    Each outcome will be described by a short message ingame.

    How to install:

    1. Download the attached package. Unrar and copy EnterHouse.script to your "[MOD]\Scripts\Game\Command\" folder.

    2. Only buildings with a child carrying the name "SearchHouse" can be entered. Check out the instructions in the provided screenshot below to find out how to add childs to buildings.

    3. Make sure the child is enabled on the buildings on your map. Test EACH building ingame at least once.

    post-4-0-42747000-1367156372_thumb.jpg

    This screenshot is also present in the provided package.

    Known bugs/problems:

    I haven't found any bugs, but for unknown reasons the game might crash without error when the unit is about to enter the building. That error is related to the prototype file of the building (I had it happen with deserthouse01.e4p and deserthouse01b_2.e4p). Solution: Recreate the entire prototype file of the building. Other than that, units might get stuck when they appear again, but this is unlikely to happen. A solution for that would've been the code: 'Game::FindFreePosition', but for some reason that code also crashes the game, so the code has been left out.

    Script usage:

    Everyone is allowed to use AND edit the script for personal use or a public mod at your own risk.

    Versions:

    SearchHouse.rar: Orginal version which has been tested.

    SearchHouse_v2.rar: Added disctinction between buildings on fire and normal buildings. Only buildings on fire or burned down might injure a unit or generate a victim, normal buildings won't. NOT TESTED BY ME

    Feedback on this script will be appreciated!

    Hoppah

    SearchHouse.rar

    SearchHouse_v2.rar

  3. Thanks everyone for the positive feedback! It's greatly appreciated and I hope to show you new content soon as the mod progresses.

    To answer your questions: the model was created (both cab and box) in Gmax by myself over the course of the last few days. The lightbar and wheels are also custom.

    [pic]

    Fap

  4. Yes and no, but scripting aint easy. I modified the script for the Manhattan Mod to have 4 working fire stations with each station having its own control panel. However, the script for the Manhattan Mod is less complex as the LA Mods one, because the control panels of the Manhattan Mod have less functionality (only the basic 'Hide/show ceiling' and 'Open/close gate' commands) and I didn't bother to change the Battalion Chief scripts for the Manhatty Mody. Changing the LA Mod scripts to have 3,4or5 completely functional fire stations would be far more work and complex with all the related scripts and (virtual) objects on the map.

    Anyway, it IS possible but it aint easy. Since the Manhattan Mod fire station script is less complex as the LA Mods one you might want to use that one as a base. :)

    Hoppah

  5. I've been dabbling with ventilation, so far I've got the guys on the roof, made sliceable objects for the guys to cut up, but where would I even begin to make this affect the burn time or intensity? D:

    Just thought I'd throw that out there :)

    Hi! If you manage to write a script that finds and reads the fireobjects of the building they're standing on you can change a few FireObject settings by script.


    class FireObject: public Actor
    {
    virtual bool IsValid() const;
    void Burn();
    void SetTemperature(float degree_); //!< Handle with care!
    float GetMaxMaterialTemperature() const;
    void SetMaterial(const char *material_);
    void Large();
    void Small();
    void StopLarge();
    void StopSmall();
    void Stop();
    bool IsBurning();
    bool IsBurned();
    void SetActive(bool active_);
    void Restart();
    virtual Vector GetPosition() const;
    virtual void SetPosition(const Vector &v_);
    };

    This might help you out, but I never bothered with the FireObjects. Check out some of the original mission scripts to find out how to apply those codes.

    I like the other idea (search building) more and I'm convinced its possible. However, I don't have a lot of time to help you with the script. My suggestion is to use the EnterHouse script and change it so you can both target open_houses AND objects named "door". However, you only want a victim or an injured firefighter when the building behind that door is actually burning, so that will make the script more complex.

    Hoppah

  6. First

    It's much easier to read and analyse the script when there are TABS in it.

    Second

    The call patrol car script was specifically designed to call the closest available vehicle and I'm not sure if your idea will work when like 20 patrol cars respond at the same time.

    You might want to try this (not tested).

    Open LACallPatrolCar.script and change this:


    VehicleList patrolCars(VT_POLICE_MTW, VT_POLICE_STW);
    for (int i = 0; i < patrolCars.GetNumVehicles(); i++)
    {
    Vehicle *aCar = patrolCars.GetVehicle(i);
    if (aCar->GetPlayerMP() == Caller->GetPlayerMP() && !aCar->IsCurrentAnimation("Getoff") && (aCar->HasCommand(CMD_STANDBY_OFF) || aCar->HasCommand(DUMMY_PATROL) || aCar->IsCollidingWithVirtualObject(VO_PARK01) || aCar->IsCollidingWithVirtualObject(VO_PARK02) || aCar->IsCollidingWithVirtualObject(VO_PARK03)))
    {
    float distCurrCar = Math::dist(CmdPos.x, CmdPos.y, aCar->GetPosition().x, aCar->GetPosition().y);
    if (distCurrCar < bestCar || bestCar == 0.)
    {
    theCar = aCar;
    bestCar = distCurrCar;
    }
    }
    }

    to


    VehicleList patrolCars(VT_POLICE_MTW, VT_POLICE_STW);
    for (int i = 0; i < patrolCars.GetNumVehicles(); i++)
    {
    Vehicle *aCar = patrolCars.GetVehicle(i);
    if (aCar->GetPlayerMP() == Caller->GetPlayerMP() && !aCar->IsCurrentAnimation("Getoff") && (aCar->HasCommand(CMD_STANDBY_OFF) || aCar->HasCommand(DUMMY_PATROL) || aCar->IsCollidingWithVirtualObject(VO_PARK01) || aCar->IsCollidingWithVirtualObject(VO_PARK02) || aCar->IsCollidingWithVirtualObject(VO_PARK03)))
    {
    theCar = aCar;
    Mission::PlayHint(HINT_BACKUP);
    if (!theCar->HasCommand(DUMMY_HASSIREN) && theCar->HasCommand(CMD_AUTOSIREN_OFF) && !Input::LShiftPressed() && !Input::RShiftPressed())
    Game::ExecuteCommand(CMD_SIREN, theCar, theCar);
    theCar->PushActionWait(ACTION_NEWLIST, 0.3f);
    if (theCar->HasCommand(DUMMY_PATROL))
    theCar->PushActionExecuteCommand(ACTION_APPEND, DUMMY_PATROL, theCar, 1, false);
    theCar->PushActionmove(ACTION_APPEND, CmdPos);
    if (theCar->HasCommand(CMD_STANDBY_OFF))
    {
    theCar->RemoveCommand(CMD_STANDBY_OFF);
    theCar->AssignCommand(CMD_STANDBY_ON);
    }
    if (theCar->HasCommand(CMD_WARNINGLIGHTS_OFF))
    {
    theCar->EnableBlinker(BLT_NONE);
    theCar->RemoveCommand(CMD_WARNINGLIGHTS_OFF);
    theCar->AssignCommand(CMD_WARNINGLIGHTS_ON);
    }
    if (theCar->HasCommand(CMD_FLOODLIGHTS_OFF))
    {
    theCar->EnableSpecialLights(false);
    theCar->RemoveCommand(CMD_FLOODLIGHTS_OFF);
    theCar->AssignCommand(CMD_FLOODLIGHTS_ON);
    }
    return;
    }
    }

    Third

    The order of the vehicles in menu is set by the alphabetical order of the folder structure in Mod/Units/Vehicles/Police.

    Sorry for my English

    Hooppah

  7. Do you have duplicates of the mod you're changing in the Mods folder?

    For example, the original LA Mod and a copy for yourself to make personal changes (like the map). Example:

    - Los Angeles Mod v2.1

    - Los Angeles Mod v2.1 fireboss-tulsa

    If so, the editor might load the original mod instead of the fireboss-tulsa version, because you didn't change e4mod.info to match the corresponding mod name.

    If not, I suggest a reinstall of the game. :(

  8. I'm glad they were able to took the second suspect in custody alive. What a show. It was frightening yet impressive what the US authorities were able to pull of. Hopefully, the second suspect doesn't die of his wounds so he can be tried for his crimes. And more importantly, this will hopefully provide an insight in his and the brother's motives.

    I'd like to pay my respects to the four who have died during the events and my thoughts are with those who got injured or affected by the events in Boston.

    RIP

    Hoppah

  9. The mod itself. When I'm trying to load freeplay, it crashes while loading.

    While loading, the game creates an extensive logfile. It might crash at a specific model when the game is going through all the files. So always check the logfile after a crash. You can also upload the logfile.

  10. What in the fuck? I recently asked Hoppah if he would like to volunteer for our team and he declines for reasons of not having any free time to work on any mods, yet he opens up a new mod and then joins you guys?

    No time, my ass, looks to me like you're on a date with cinnamon-roll-fuckin-head.

    Favoritism is disgusting. I'm off this forum.

    That's not really fair to say, is it? Why can't I make my own choices? I'm currently working almost 50 hrs a week and in my spare time I'm trying to make a new mod since I'm too tired/ill to do anything else. Me and rafael just agreed that we can share expertise. He is building me a couple of models (I'm slow at moddeling) for the US army mod and I'm only fixing a couple of scripts and giving advice regarding performance issues. I didn't join his team and I'm certainly not going to do all the scripting for them from now on. I'm just a freelancer for this project basically.

    And yes, this mod is appealing to me, but I haven't played it for longer than 10 minutes total and my pc is way too slow to play it smoothly. There are a ton of mods which have the potentials (including yours, I made a compliment about the vehicles) to grow big. I'm getting requests to help people with their mods about twice a week, so it's kinda obvious I can't help everyone out. This also one of the reasons why I gave permission to everyone to edit the LA mod and do with it whatever they want, so people have a base to start with. I just can't supervise or oversee every mod there is, and I'm not even supervising this mod, thats Rafaels/Dysons job imo.

    Hoppah

×
×
  • Create New...