Jump to content
FInn Rescue 12

Boston Mod [RELEASED]

Recommended Posts

Whats up out there just a little update on some units I have been working on thanks for your support. I am looking for a little up help with a script issues with getting the GetStryker to work.

 

If you need some assistance I am willing to help.  I am going to be working on the update for my Boston Mod within the next month or so as well.

Link to comment
Share on other sites

Whats up out there just a little update on some units I have been working on thanks for your support. I am looking for a little up help with a script issues with getting the GetStryker to work.

 

 

gonna throw this update or you can pass it to me by email? please

Link to comment
Share on other sites

Hello all,

I have been enjoying the Boston Mod for a couple weeks. Great Mod! I do have a problem I was looking to fix. All of the ladder trucks have no skins. They show up as all white? The NY mod works normally.i tried reinstalling the mod and checked the folders to make sure the skins were there, everything seemed normal. Any help would be great, I love this mod and I want my ladder trucks to work! Thanks!

Link to comment
Share on other sites

Go into the editor, select the ladder truck, edit it, and somewhere on the main page it says "alpha reflections" with a click box. unclick it. repeat for all ladder trucks. this also works for other models (including metallic shiny people) and in other mods. usually the models look better without it but you have to check around to see if they actually do.

Link to comment
Share on other sites

This is the a video of the GetStryker issue.

 

 

 

So the issue is when he picks up the victim? He shoulders them instead of putting on stretcher. This also happened to me...are you using the included lift command that came with the mod or the default unedited one? If you aren't using it, use this one. Just throw it in your scripts/command folder. File is from orginal Stryker Stretcher mod on Emergency forum.de by THW Teufel.

Stryker Scripts.zip

Link to comment
Share on other sites

Looks like you need lines to hide the person after being picked up, and to enable the correct patient child on the unit. I have it working in my script; not currently on that PC so I can't post it.

 

Edit: Here we go. Here's what my Lift script looks like in my LA mod. "DummyLiftStretcher" is what handles the various actions that need to happen after picking the person up with a stretcher. I changed the command names into English and tweaked other things somewhat, too, so just use this as an example.

 

The only issue I ran into with the Stryker was that when transporting the patient from the ambulance to the hospital, the patient would reappear, the unit would wig out and start spinning around while trying to walk, and sometimes getting stuck doing that and never get into the hospital. I fixed this by moving the PutInBase action before the move action so the patient gets removed before that..

 

//**********************************************************************************//
//    Scripts by Hoppah, Modified by Xplorer4x4, YSB, and The Loot.                    //
//**********************************************************************************//

const char HINT_NOT_DEAD[]    = "This person is still alive!";

const char PER_COR[]     = "mod:Prototypes/Persons/01 LA Ambulance/coroners.e4p";

int DummyGroup = 20;

object Lift : CommandScript
{
    Lift()
    {
        SetIcon("liftperson");
        SetCursor("liftperson");
        SetValidTargets(ACTOR_PERSON);
        SetGroupID(CGROUP_CARRY_PERSON);
        SetGroupLeader(true);
        SetPriority(400);
        SetSelfClickActivation(true);
        SetPossibleExists(CPE_DROWNING_PERSONS | CPE_INJURED_PERSON);
        SetPossibleEquipment(EQUIP_NONE);
    }
    bool CheckGroupVisibility(GameObject *Caller)
    {
        if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON)
            return false;
        Person p(Caller);
        if (p.IsCarryingPerson())
            return false;
        if (p.HasCommand("Dive"))
            return Game::ExistsDrowningPerson();
        return Game::ExistsInjuredPerson();
    }
    bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
    {
        if(!Caller->IsValid() || Caller->IsEquipped() || !Target->IsValid() || Target->GetID() == Caller->GetID())
            return false;
        Person p(Caller);
        Person t(Target);
        if (StrCompare(p.GetPrototypeFileName(), PER_COR) != 0 && t.HasCommand("DummyBlanket"))
            return false;
        // if (p.IsParamedicTeam() && !t.HasCommand("DummyHealed"))
            // return false;
        if(p.IsValid() && !p.IsCarryingPerson()&& !p.IsLinkedWithPerson() && !p.IsPulling() && t.IsValid() && t.IsInjured() && !t.IsCarried() && t.GetRole()!=ROLE_ANIMAL && !t.IsRescueDog())
        {
            if (p.GetEnteredCarID() != -1 && p.GetEnteredCarTargetID() != t.GetEnteredHouseID())
                return false;
            if (p.GetEnteredCarID() == -1 && t.GetEnteredHouseID() != -1 && t.GetEnteredHouseID() != p.GetEnteredHouseID() && !t.IsInHouseWithGroundEntrance())
                return false;
            if (p.HasCommand("Dive") && !t.IsDrowning())
                return false;
            if(!p.HasCommand("Dive") && t.IsDrowning())
                return false;
            if(p.IsCurrentAction("EActionTreatPerson"))
                return false;
            return true;
        }        
        return false;
    }
    void PushActions(GameObject *Caller, Actor *Target, int childID)
    {
        Person p(Caller);
        Person t(Target);
        if(StrCompare(p.GetPrototypeFileName(), PER_COR) == 0)
        {
            if (t.IsClassified() && !t.IsDead())
            {
                Mission::PlayHint(HINT_NOT_DEAD);
                return;
            }
            if (p.GetEnteredCarID() == -1)
            {
                Caller->PushActionMove(ACTION_NEWLIST, Target, TARGET_TOUCHPERSON);
                Caller->PushActionTurnTo(ACTION_APPEND, Target);
                Caller->PushActionExecuteCommand(ACTION_APPEND, "DummyLife", Target, 0, false);
            }
            else
            {
                if (t.GetEnteredHouseID() == p.GetEnteredCarTargetID())
                {
                    Caller->PushActionEnterHouse(ACTION_NEWLIST, t.GetEnteredHouseID());
                    Caller->PushActionMove(ACTION_APPEND, Target, TARGET_TOUCHPERSON);
                    Caller->PushActionTurnTo(ACTION_APPEND, Target);
                    Caller->PushActionExecuteCommand(ACTION_APPEND, "DummyLife", Target, 0, false);
                }
                else
                    Caller->PushActionTurnTo(ACTION_NEWLIST, Target);
                Caller->PushActionExecuteCommand(ACTION_APPEND, "DummyLife", Target, 0, false);
            }
        }
        else if(p.HasCommand("DummyPersonHasStretcher"))
        {
            p.PushActionMove(ACTION_NEWLIST, Target, TARGET_TOUCHPERSON);
            p.PushActionTurnTo(ACTION_APPEND, Target);
            p.PushActionLift(ACTION_APPEND, Target);
            p.PushActionExecuteCommand(ACTION_APPEND, "DummyLiftStretcher", Target, 0, false);            
        }
        else
        {
            if (p.GetEnteredCarID() == -1)
            {
                if (p.HasCommand("Dive"))
                    Caller->PushActionMove(ACTION_APPEND, Target, TARGET_FOLLOW);
                else
                    Caller->PushActionMove(ACTION_NEWLIST, Target, TARGET_TOUCHPERSON);
                Caller->PushActionTurnTo(ACTION_APPEND, Target);
                Caller->PushActionLift(ACTION_APPEND, Target);
            }
            else
            {
                if (t.GetEnteredHouseID() == p.GetEnteredCarTargetID())
                {
                    Caller->PushActionEnterHouse(ACTION_NEWLIST, t.GetEnteredHouseID());
                    Caller->PushActionMove(ACTION_APPEND, Target, TARGET_TOUCHPERSON);
                    Caller->PushActionTurnTo(ACTION_APPEND, Target);
                }
                else
                    Caller->PushActionTurnTo(ACTION_NEWLIST, Target);
                Caller->PushActionLift(ACTION_APPEND, Target);                
            }            
        }        
    }
};

object DummyLiftStretcher : CommandScript
{
    DummyLiftStretcher()
    {
        SetGroupID(20);
    }
    bool CheckTarget(GameObject *Caller, Actor *Target, int ChildID)
    {}
    void PushActions(GameObject *Caller, Actor *Target, int ChildID)
    {
        Person p(Caller);
        Person t(Target);
        if(ChildID == 0)
        {
            p.SetUserData(t.GetID());
            t.PushActionShowHide(ACTION_NEWLIST, true);
            p.SetChildEnabled("Patient", true);
            // t.ChangePrototype("mod:Prototypes/Persons/Ambulance/Patient.e4p");
            p.AssignCommand("DummyPersonHasPatient");
            p.RemoveCommand("PcmdRemoveEquipment");
            p.RemoveCommand("UnloadPerson");
            p.RemoveCommand("Lift");
            // p.RemoveCommand("DropStryker");            
        }
    }
};

object DummyPersonHasPatient : CommandScript
{
    DummyPersonHasPatient()
    {
        SetGroupID(120);
    }
    bool CheckGroupVisibility(GameObject *Caller)
    {
        return false;
    }
    void PushActions(GameObject *Caller, Actor *Target, int childID)
    {}
};

object DummyLife : CommandScript
{
    DummyLife()
    {
        SetGroupID(DummyGroup);
    }

    bool CheckPossible(GameObject *Caller)
    {
        return false;
    }
    
    bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
    {
        return false;
    }

    void PushActions(GameObject *Caller, Actor *Target, int childID)
    {
        Person t(Target);
        if (!t.IsClassified())
            t.SetClassified(true);
        if (t.IsDead())
        {
            if (!t.HasCommand("DummyBlanket"))
            {
                Caller->PushActionExecuteCommand(ACTION_APPEND, "PcmdDead", &t, 0, false);
                return;
            }
            Caller->PushActionLift(ACTION_APPEND, Target);  
        }
        else
        {
            Caller->PushActionSwitchAnim(ACTION_APPEND, "paramedicput");
            Caller->PushActionWait(ACTION_APPEND, 0.5f);
            Caller->PushActionSwitchAnim(ACTION_APPEND, "paramedicget");
            Mission::PlayHint(HINT_NOT_DEAD);
            return;
        }
    }
};

Edited by The Loot
Link to comment
Share on other sites

Have this working in the WIP version of Montana Mod. I will need bama and Dyson's permission to release it, but I can show it.
t2JIDkN.png

Utilizes heavilly modified stretcher script. Ambulances are coded to have one and only one stretcher. Once you get it, you need to return it otherwise you wont be able to get a stretcher from said vehicle. Paramedic can lift and drop patient on ground. He can also leave the stretcher on the ground.
Once the patient is treated, paramedic can put the patient in the ambulance. He is unable to drop the stretcher at this point.

He will put the patient in the ambulance and then he is free to do whatever. Note that one cannot get a stretcher if a patient is in the ambulance.
The patient cannot be removed from the ambulance either. EM4 is hardcoded to prevent this.

The main issue with the script is that the person is never properly set on the stretcher. Another issue is that it causes lag because the script updates the location of the person every half second. Third, this line ends up spamming one's logfile causing it to grow into 30mb after an hour or so of gameplay.
 

Rotation of GameObject: -0.886034 0.463620 0.000000 -0.463620 -0.886034 0.000000 0.000000 0.000000 1.000000

This logging cannot be disabled unfortunately. The script isnt MP compatible either because it would probably crash servers due to the insane number of processes it needs to do.

Link to comment
Share on other sites

Have this working in the WIP version of Montana Mod. I will need bama and Dyson's permission to release it, but I can show it.

t2JIDkN.png

Utilizes heavilly modified stretcher script. Ambulances are coded to have one and only one stretcher. Once you get it, you need to return it otherwise you wont be able to get a stretcher from said vehicle. Paramedic can lift and drop patient on ground. He can also leave the stretcher on the ground.

Once the patient is treated, paramedic can put the patient in the ambulance. He is unable to drop the stretcher at this point.

He will put the patient in the ambulance and then he is free to do whatever. Note that one cannot get a stretcher if a patient is in the ambulance.

The patient cannot be removed from the ambulance either. EM4 is hardcoded to prevent this.

The main issue with the script is that the person is never properly set on the stretcher. Another issue is that it causes lag because the script updates the location of the person every half second. Third, this line ends up spamming one's logfile causing it to grow into 30mb after an hour or so of gameplay.

 

Rotation of GameObject: -0.886034 0.463620 0.000000 -0.463620 -0.886034 0.000000 0.000000 0.000000 1.000000

This logging cannot be disabled unfortunately. The script isnt MP compatible either because it would probably crash servers due to the insane number of processes it needs to do.

 

Very nice, this is pretty much one step further than I took it, I had the stretcher as a dropable object etc, and I had a similar script with the spineboard using actual person model instead of generic, very nice. You have my permission :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...