Jump to content

The Loot

Members
  • Posts

    753
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by The Loot

  1. Why isn't the modder able to include those two Corona files in his mod folder from the beginning?

    Because they might not be allowed to?

    The white squares will also be gone if you include the coronas in your modfolder in the right directionary.

    Never worked for me.

    Instead they tell you to change your main game files. Rule nr.1 never change your main game files without backup.

    In this case, these are NEW files, as far as I remember.

  2.  

    I tried my own method. Its a bit intrusive though.

    • Normal method of placing wye/water supply BUT
      • Only the FF who set up the supply/wye/extension can remove it
      • If you select the wrong FF, the game will script the right one for you
      • The problem lies here. It isn't obvious that another FF has been selected, so he may be in the middle of doing something else important when you send him to remove the thing
      • Also, the FF would have to be on the map in the first place. Can't send him away otherwise -GAME CRASH-

     

    I'd suggest going back to the original way, and then adding the ChangePrototype line in the appropriate places. Other than the invisible firehose, I've never run in to any issues.

  3. This is a bug in the water supply script. All mods using the script have this issue. Montana does, my LA Mod does, this mod does. Can't be fixed unfortunately.

     

    Actually, it just takes one line to fix the switch;. the only issue is that the firehose turns invisible for some reason. I can post later when I get to my main system after work.

  4. Are you crazy... Announcing it will jinx it ;) lol jk good luck, looking forward to playing the mod and THVFD the ladder looks good, its nice to see a new model being made.

     

    But jinxing it on a Friday the 13th is a double jinx, and will then turn into good luck... or something.

  5. towtruck.v3o is the unloaded version of the truck

    towtruck2.v3o is the loaded version of the truck

    there should be only one prototype file for this to work.. there does not need to be a second prototype for the loaded version, the game automatically goes to the loaded model.

    towtruck.e4p

     

    Make sure that your loaded/unloaded are in the same folder and named correctly and both are present as intended.

    Vehicle type must be ASF

     

    So that's how they work. Since the LA mod always had a loaded prototype, I expected it to just swap those out, but when I was setting restrictions regarding the loaded proto, they never worked, and that explains it.

  6. Hope this is what you are looking for.  This is the BombRobot Script

     

    Looks like your vehicle checks were a little off with an errant parenthesis. I went ahead and fixed both lines of those, and I also added constants with the prototype filepaths and pointed them to those, which will make it easier to change the prototype files if you need to in the future.

     

    //******************************************************************************************// #Version 1.0#////         Includes: All bomb squad robot scripts.////    - PcmdRobotGet//    - PcmdRobotRemove//    - PcmdRobotSendTo//    - PcmdRobotUse//    - PcmdDummyRobot////        Script by Hoppah//        //        Usage of this script in other mods is NOT allowed without permission of Hoppah////****************************************************************************************** const char CMD_FLOODLIGHTS_ON[]        = "VCmdFloodLightsOn";const char CMD_FLOODLIGHTS_OFF[]        = "VCmdFloodLightsOff";const char CMD_DOORS[]                = "OpenCloseDoor";const char HINT_MAXREACHED[]             = "Only one robot is allowed!";const char ANI_MIKE[]                 = "talkmike";const char ANI_IDLE[]                 = "idle";const char CMD_GETROBOT[]            = "PcmdRobotGet";const char CMD_REMOVEROBOT[]            = "PcmdRobotRemove";const char CMD_SENDROBOT[]            = "PcmdRobotSendTo";const char CMD_USEROBOT[]            = "PcmdRobotUse";const char OBJ_RADIO[]                = "01 LA Equipment/radio.V3O";const char OBJ_ROBOT[]                 = "mod:Prototypes/Vehicles/06 Objects/bomb_squad_robot.e4p";const char NAME_ROBOT[]             = "BombRobot";const char NAME_BOMB01[]            = "bomb";const char NAME_BOMB02[]            = "m03_bomb";const char DUMMY_ROBOT[]            = "DummyRobot"; const char VEH_BOMB1[]            = "mod:Prototypes/Vehicles/03 LA Police/suv_bomb_squad.e4p";const char VEH_BOMB2[]            = "mod:Prototypes/Vehicles/03 LA Police/BombSquad2.e4p"; int DummyGroup = 20; object PcmdRobotGet : CommandScript{    PcmdRobotGet()    {        SetIcon("robotget");        SetCursor("robotget");        SetValidTargets(ACTOR_VEHICLE | ACTOR_OBJECT);        SetGroupID(CGROUP_GETEQUIPMENT);        SetRestrictions(RESTRICT_NOTDESTROYED | RESTRICT_NOTBURNING);        SetPossibleCallers(ACTOR_PERSON);    }bool CheckPossible(GameObject *Caller)    {        GameObjectList SelectPer = Game::GetSelectedGameObjects();        if (SelectPer.GetNumObjects() > 1)            return false;Person p(Caller);        if (p.IsValid() && (p.IsCarryingPerson() || p.IsLinkedWithPerson() || p.GetFirehoseID() != 0 || p.IsPulling() || p.GetEnteredCarID() != -1))            return false;if (!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON)            return false;return true;    }bool CheckTarget(GameObject *Caller, Actor *Target, int childID)    {        if(!Caller->IsValid() || !Target || !Target->IsValid() || Target->GetType()!=ACTOR_VEHICLE)            return false;                if(Caller->GetObjectType()==TYPE_PERSON)        {            Person p(Caller);            if(p.IsValid() && (p.IsLinkedWithPerson() || p.IsCarryingPerson() || p.IsEquipped() || p.IsPulling() || p.GetFirehoseID()!=0 || p.GetEnteredCarID() != -1))                return false;             Vehicle v(Target);            if (v.IsValid() && !v.IsDestroyed() && (StrCompare(v.GetPrototypeFileName(), VEH_BOMB1) == 0 || StrCompare(v.GetPrototypeFileName(), VEH_BOMB2) == 0))            {                return true;            }            return false;        }        }    void PushActions(GameObject *Caller, Actor *Target, int childID)    {        GameObjectList list = Game::GetGameObjects(NAME_ROBOT);        if (list.GetNumObjects() > 0)        {            Mission::PlayHint(HINT_MAXREACHED);            return;        }         Vector TargetPos = Target->GetTargetPoint(Caller, TARGET_EQUIPMENTDOOR);         Caller->PushActionMove(ACTION_NEWLIST, TargetPos);        Caller->PushActionTurnTo(ACTION_APPEND, Target);        Caller->PushActionGetEquipment(ACTION_APPEND, Target, EQUIP_NONE);        Caller->PushActionExecuteCommand(ACTION_APPEND, DUMMY_ROBOT, Target, 1, false);    }}; object PcmdRobotRemove : CommandScript{        PcmdRobotRemove()    {            SetIcon("robotremove");            SetCursor("robotremove");        SetValidTargets(ACTOR_VEHICLE | ACTOR_OBJECT);        SetGroupID(CGROUP_GETEQUIPMENT);        SetRestrictions(RESTRICT_NOTDESTROYED | RESTRICT_NOTBURNING);        SetPossibleCallers(ACTOR_PERSON);    }     bool CheckTarget(GameObject *Caller, Actor *Target, int childID)    {        if(!Caller->IsValid() || !Target || !Target->IsValid() || Target->GetType()!=ACTOR_VEHICLE)            return false;                if(Caller->GetObjectType()==TYPE_PERSON)        {            Person p(Caller);            if(p.IsValid() && (p.IsLinkedWithPerson() || p.IsCarryingPerson() || p.IsEquipped() || p.IsPulling() || p.GetFirehoseID()!=0 || p.GetEnteredCarID() != -1))                return false;             Vehicle v(Target);            if (v.IsValid() && !v.IsDestroyed() && (StrCompare(v.GetPrototypeFileName(), VEH_BOMB1) == 0 || StrCompare(v.GetPrototypeFileName(), VEH_BOMB2) == 0))            {                return true;            }            return false;        }    }    void PushActions(GameObject *Caller, Actor *Target, int childID)    {        Person p(Caller);        int UnitID = p.GetID();        VehicleList list(NAME_ROBOT);        if (list.GetNumVehicles() > 0)        {            if (list.GetVehicle(0)->GetUserData() == UnitID)            {                Vehicle obj = list.GetVehicle(0);                if (!obj.IsValid() || obj.IsDestroyed() || obj.IsSmoking() || obj.IsCarried())                {                    System::Log("Robot not capable of performing actions!");                    p.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ROBOT, Caller, 3, false);                    return;                }                else if (!obj.IsCurrentAction("EActionUse") && !obj.IsDestroyed() && obj.IsValid())                {                    System::Log("Robot found!");                        Vector TargetPos = Target->GetTargetPoint(Caller, TARGET_EQUIPMENTDOOR);                    p.PushActionMove(ACTION_NEWLIST, TargetPos);                    p.PushActionTurnTo(ACTION_APPEND, Target);                    p.PushActionGetEquipment(ACTION_APPEND, Target, EQUIP_NONE);                    p.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ROBOT, Target, 2, false);                     obj.PushActionMove(ACTION_NEWLIST, TargetPos);                    obj.PushActionTurnTo(ACTION_APPEND, Target);                }                else                {                    System::Log("Robot found, but has EactionUse!");                    }            }        }        else        {            System::Log("Robot not found!");            p.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ROBOT, Caller, 3, false);        }    }}; object PcmdRobotSendTo : CommandScript{    PcmdRobotSendTo()    {        SetIcon("sendto");        SetCursor("sendto");        SetValidTargets(ACTOR_FLOOR | ACTOR_VIRTUAL);        SetPriority(200);        SetDeselectCaller(false);        SetSelfClickActivation(true);        SetHighlightingEnabled(false);         SetGroupLeader(true);    }bool CheckTarget(GameObject *Caller, Actor *Target, int childID)    {        if(!Caller->IsValid() || Caller->GetID() == Target->GetID())            return false;         if (Caller->GetType() != ACTOR_PERSON)            return false;         Person p(Caller);        if(p.IsValid() && (p.IsLinkedWithPerson() || p.IsCarryingPerson() || p.IsEquipped() || p.IsPulling() || p.GetFirehoseID()!=0 || p.GetEnteredCarID() != -1))            return false;         if (p.IsCurrentAction("EActionTreatPerson"))            return false;         return true;    }void PushActions(GameObject *Caller, Actor *Target, int childID)    {        Person p(Caller);        Vector CmdPos = Game::GetCommandPos();        Caller->PushActionTurnTo(ACTION_NEWLIST, CmdPos);        Caller->PushActionSwitchAnim(ACTION_APPEND, ANI_MIKE);        Caller->PushActionWait(ACTION_APPEND, 3.5f);        Caller->PushActionSwitchAnim(ACTION_APPEND, ANI_IDLE);int UnitID = p.GetID();        VehicleList list(NAME_ROBOT);        if (list.GetNumVehicles() > 0)        {            if (list.GetVehicle(0)->GetUserData() == UnitID)            {                Vehicle obj = list.GetVehicle(0);                if (!obj.IsValid() || obj.IsDestroyed() || obj.IsSmoking() || obj.IsCarried())                {                    System::Log("Robot not capable of performing actions!");                    p.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ROBOT, Caller, 3, false);                    return;                }                else if (!obj.IsCurrentAction("EActionUse") && !obj.IsDestroyed() && obj.IsValid())                {                    System::Log("Robot found!");                        obj.PushActionWait(ACTION_NEWLIST, 0.2f);                    obj.PushActionMove(ACTION_APPEND, CmdPos);                }                else                {                    System::Log("Robot found, but has EactionUse!");                    }            }        }        else        {            System::Log("Robot not found!");            p.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ROBOT, Caller, 3, false);        }    }}; object PcmdRobotUse : CommandScript{        PcmdRobotUse()    {        SetIcon("use");        SetCursor("use");        SetValidTargets(ACTOR_OBJECT);        SetRestrictions(RESTRICT_USABLE);        SetPriority(700);        SetSelfClickActivation(true);    }    bool CheckPossible(GameObject *Caller)    {        if (!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON)            return false;        return Game::ExistsObjectWithFlagSet(OF_USABLE);    }        bool CheckTarget(GameObject *Caller, Actor *Target, int ChildID)    {        if (!Caller->IsValid() || !Target->IsValid() || Caller->GetID()==Target->GetID())            return false;                GameObject obj(Target);        Person p(Caller);        if(!obj.HasName(NAME_BOMB01) && !obj.HasName(NAME_BOMB02) && !obj.IsValid())            return false;        return true;    }    void PushActions(GameObject *Caller, Actor *Target, int childID)    {        Person p(Caller);        Vector CmdPos = Target->GetPosition();        Caller->PushActionTurnTo(ACTION_NEWLIST, CmdPos);        Caller->PushActionSwitchAnim(ACTION_APPEND, ANI_MIKE);        Caller->PushActionWait(ACTION_APPEND, 3.5f);        Caller->PushActionSwitchAnim(ACTION_APPEND, ANI_IDLE);        int UnitID = p.GetID();        VehicleList list(NAME_ROBOT);        if (list.GetNumVehicles() > 0)        {            if (list.GetVehicle(0)->GetUserData() == UnitID)            {                Vehicle obj = list.GetVehicle(0);                if (!obj.IsValid() || obj.IsDestroyed() || obj.IsSmoking() || obj.IsCarried())                {                    System::Log("Robot not capable of performing actions!");                    p.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ROBOT, Caller, 3, false);                    return;                }                else if (!obj.IsCurrentAction("EActionUse") && !obj.IsDestroyed() && obj.IsValid())                {                    System::Log("Robot found!");                        obj.PushActionMove(ACTION_NEWLIST, Target, TARGET_USE);                    obj.PushActionTurnTo(ACTION_APPEND, Target);                    obj.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ROBOT, &obj, 4, false);                    obj.PushActionUse(ACTION_APPEND, Target);                    obj.PushActionWait(ACTION_APPEND, 0.5f);                    obj.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ROBOT, &obj, 5, false);                }                else                {                    System::Log("Robot found, but has EactionUse!");                    }            }        }        else        {            System::Log("Robot not found!");            p.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ROBOT, Caller, 3, false);        }    }}; object DummyRobot : CommandScript{    DummyRobot()    {SetGroupID(DummyGroup);    }    bool CheckGroupVisibility(GameObject *Caller)    {        return false;    }    bool CheckPossible(GameObject *Caller)    {return false;    }bool CheckTarget(GameObject *Caller, Actor *Target, int childID)    {return false;    }void PushActions(GameObject *Caller, Actor *Target, int childID)    {        if(childID == 1)        {            Person p(Caller);            p.PlaceObjectInRightHand(OBJ_RADIO);            p.PushActionSwitchAnim(ACTION_APPEND, "idleequipped2");            p.AssignCommand(CMD_REMOVEROBOT);            p.RemoveCommand(CMD_GETROBOT);            p.AssignCommand(CMD_SENDROBOT);            p.AssignCommand(CMD_USEROBOT);            p.RemoveCommand("Use");            p.RemoveCommand("EnterCar");            p.RemoveCommand("EnterHouse");            Vehicle v(Target);            v.PushActionExecuteCommand(ACTION_APPEND, CMD_DOORS, Caller, 1, false);            Vector CarPos = v.GetPosition();            float r[9];            v.GetRotation(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8]);            Vehicle m = Game::CreateVehicle(OBJ_ROBOT, NAME_ROBOT);            if (Game::FindFreePosition(&m, CarPos))            {m.SetPosition(CarPos);                m.SetRotation(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8]);                m.UpdatePlacement();                m.Hide();                m.PushActionWait(ACTION_NEWLIST, 0.6f);                m.PushActionShowHide(ACTION_APPEND, false);                m.SetUserData(p.GetID());                m.SetPlayerMP(p.GetPlayerMP());                m.SetSpeed(4.5f);                m.SetParking(true);            }        }        if(childID == 2)        {Person p(Caller);            int UnitID = p.GetID();VehicleList list(NAME_ROBOT);            if (list.GetNumVehicles() > 0)            {                if (list.GetVehicle(0)->GetUserData() == UnitID)                {                    Vehicle obj = list.GetVehicle(0);                    if (!obj.IsCurrentAction("EActionFindPath"))                    {                        p.RemoveObjectInRightHand();                        p.PushActionSwitchAnim(ACTION_NEWLIST, "idle");                        p.RemoveCommand(CMD_REMOVEROBOT);                        p.AssignCommand(CMD_GETROBOT);                        p.RemoveCommand(CMD_SENDROBOT);                        p.RemoveCommand(CMD_USEROBOT);                        p.AssignCommand("Use");                        p.AssignCommand("EnterCar");                        p.AssignCommand("EnterHouse");                        obj.PushActionDeleteOwner(ACTION_NEWLIST);                        Vehicle v(Target);                        v.PushActionExecuteCommand(ACTION_APPEND, CMD_DOORS, Caller, 1, false);                    } else                    {                        p.PushActionWait(ACTION_NEWLIST, 2.0f);                        p.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ROBOT, Target, 2, false);                    }                }            }        }        if(childID == 3)        {            Person p(Caller);            p.RemoveObjectInRightHand();            p.PushActionSwitchAnim(ACTION_NEWLIST, "idle");            p.RemoveCommand(CMD_REMOVEROBOT);            p.AssignCommand(CMD_GETROBOT);            p.RemoveCommand(CMD_SENDROBOT);            p.RemoveCommand(CMD_USEROBOT);            p.AssignCommand("Use");            p.AssignCommand("EnterCar");            p.AssignCommand("EnterHouse");        }        if(childID == 4)        {            System::Log("Open door");            Vehicle v(Caller);            v.PlayAnimOpenDoor(DAT_SPECIAL, 2.0f, NULL);         }        if(childID == 5)        {            System::Log("Close door");            Vehicle v(Caller);            v.PlayAnimCloseDoor(DAT_SPECIAL, 1.6f, NULL);        }    }};

     

    Hopefully that will do it for the issue.

     

  7. If you want a really strange but rather uncommon project to do (some police did use these things) you could always try your luck at a Whelen Fast Trax lighting system, I personally found them to be extremely ugly, but I'm sure some people would like the things.

     

    I think I threw up a little in my mouth.

  8. Previously, I had stated (as above) that when I added a 2nd Bomb Squad Unit if I tried to get the robot, it caused an error. 

    This is the error I get.  Happens if I click with the Bomb Defusal officer on the vehicle.  If I hit Ignore, I can go back to game.  But no matter what, I cannot get the robot out of either the original vehicle, or the new vehicle.

     

    Can you post that script real quick? It should be a very simple fix but I'd have to take a look to see exactly how it is.

  9. I was trying to mess around with tow trucks and never seemed to get my changes working. It appears that the LA mod didn't touch the script in question, "loadup", since it only exists in the base game's scripts.

    Go ahead and copy it over onto the LA command script folder, then take a look at the "CheckTarget" section. The lines under "if (Target->GetType() == ACTOR_VEHICLE)" control if a targeted vehicle can be chosen. I'm not entirely sure, but it could be the "if (!v.IsParking()) return false;" that stops you from picking up active traffic vehicles.

  10. Got any info on this vehicle? Is this used by SWAT or normal police?

    https://www.youtube.com/watch?v=IcDjEckzDeU#t=194

    And yes, I want to make it. PD units have not been forgotten.

     

    The White Suburbans? I'd probably guess SWAT, but it could serve as any sort of UC vehicle.

     

    Or do you mean the Command truck seen there? The "Mobile Sub-stations" seem to be used as mini police stations in problem areas, or at major incidents.

  11. The issue with Gated Wye is that is has an invisible man on it. If he gets injured, then you can't pick it up. This was an issue the LA mod dealt with too. I don't recall if a solution was ever created

    Wouldn't setting very high resistances to all forms of injury work?

    Like:

    p.SetResistance(INJUREREASON_CONTAM_ATOM, 100000.0f);p.SetResistance(INJUREREASON_CONTAM_CHEM, 100000.0f);p.SetResistance(INJUREREASON_CONTAM_BIO, 100000.0f);p.SetResistance(INJUREREASON_DROWN, 100000.0f);p.SetResistance(INJUREREASON_ENERGY, 100000.0f);p.SetResistance(INJUREREASON_FIRE, 100000.0f);p.SetResistance(INJUREREASON_SHOT, 100000.0f);p.SetResistance(INJUREREASON_UNKNOWN, 100000.0f);

    I had issues with the original LA mod wyes, and some of the initial versions of Hoppah's Wyes and Extensions from the Water Supply mod (though he worked out a fix relating to the LA firefighters being set as medical personnel), but I don't think I've ever had an issue with the hidden person being injured.

     

  12. Let me ask you something, why did you put the LAX-units (ambulance and airport tanker) in the mod? I mean they aren't bad but it doesn't really make sense since there is no airport on the map. :nixweiss:

     

    There are several missions that take place at an airport in the game and the LA mod. While freeplay may not have an airport, those units aren't completely out of place.

×
×
  • Create New...