Jump to content
EM4life

Changing units

Recommended Posts

I want to change out the three Ambulance02s (ALS) at FS1, with an LED version I downloaded. I want to know the file locations to change out these spawns, and which lines to edit in the spawning and in the "go to FS" command.

Link to comment
Share on other sites

How have you got these? As brand new units?

It'd be just as easy to overwrite the old with the new.

Here's the mod I'm talking about. It includes an LED version of the ALS Ambulance. I want it to replace three the ALS Ambulances parked at FS1, and I want them to have the ability to park there using the "go to station" command. Those should be the same thing.

Link to comment
Share on other sites

It should be as easy as changing out the ALS information in the Firestation scripts with the prototype of your new ambulance.

const char OBJ_AMBULANCE02[]			= "mod:Prototypes/Vehicles/01 LA Ambulance/ambulance02.e4p";

Simply rename the e4p to match the e4p name of your new ambulance

in both the LA FireStation.script and LAFireStationStart.scripts...

As long as the vehicles are otherwise identical it should work fine...

Then in the editor you have to add the commands that are on the original Ambulance02 to your new one in order for the ambulance to find it's way to the fire station.

Link to comment
Share on other sites

It should be as easy as changing out the ALS information in the Firestation scripts with the prototype of your new ambulance.

const char OBJ_AMBULANCE02[]			= "mod:Prototypes/Vehicles/01 LA Ambulance/ambulance02.e4p";

Simply rename the e4p to match the e4p name of your new ambulance

in both the LA FireStation.script and LAFireStationstart.scripts...

As long as the vehicles are otherwise identical it should work fine...

Then in the editor you have to add the commands that are on the original Ambulance02 to your new one in order for the ambulance to find it's way to the fire station.

Thanks a bunch!

Link to comment
Share on other sites

Crap, new problem...the ambulance spawns at the FS but once droping off it's patient, it won't go back.

Does anyone know what script and what line to alter to make it go back and park?

You'll probably have to edit or add the LATofirestattion.script script. But since the script is so large I have no idea what line you should change. You could just try adding the go to fire station command to your ambulance and see if it works.

Link to comment
Share on other sites

You'll probably have to edit or add the LATofirestattion.script script. But since the script is so large I have no idea what line you should change. You could just try adding the go to fire station command to your ambulance and see if it works.

It already has that command, yet it says "vehicle does not belong in the fire station!"

This mod replaces the ambulance at FS1 anyway..

No it doesn't...I had to do that myself...

Link to comment
Share on other sites

PROBLEM: All is working well except the alarm. When raised to refill the vehicles, it shows a script error for the new ambulances

Does anyone know the script lines (In LAFireStation script right?) that are used when the alarm is raised for the ambulances at FS 1?

Link to comment
Share on other sites

Hit retry when it gives the error. Then it will tell you the line number causing the problem. Load the script in something like Notepad2 which shows line numbers and you can skip right to the line where the problem is and then try to figure out what went wrong.

Plus the line numbers, if thats what you meant, can become useless in a case like mine where my scripts are hacked to death, so depending on what you did to the script, whats on line 400 may be on line 350 for you.

Link to comment
Share on other sites

Hit retry when it gives the error. Then it will tell you the line number causing the problem. Load the script in something like Notepad2 which shows line numbers and you can skip right to the line where the problem is and then try to figure out what went wrong.

Plus the line numbers, if thats what you meant, can become useless in a case like mine where my scripts are hacked to death, so depending on what you did to the script, whats on line 400 may be on line 350 for you.

First, how do I find line say 350, and, second, mine calls it "(v.GetVehicleType() == VT_AMBULANCE_RTW)", while others are called "(StrCompare(v.GetPrototypeFileName(), OBJ_USAR) == 0)"

The USAR is the same for all other vehicles, except the ambulance which is always "VT_AMBULANCE_RTW".

Link to comment
Share on other sites

First, how do I find line say 350

Read the post above, i told you the app name.

As for what you want to do, the easiest way is to simply rename ambulance02LED3D.v3o to ambulance02.v3o and then copy that and LightbarRNR.dds to the models folder inside the LA Mod folder. This would replace the regular ALS with the LED Version.

Now if you want to have both the regular ALS and LED ALS available in the mod your going to have to edit latofirestation,lafirestationstart,and latofirestation. The easiest way to do this is grab the app I mentioned above.

In all 3 scripts towards the top find:

const char OBJ_AMBULANCE02[]			= "mod:Prototypes/Vehicles/01 LA Ambulance/ambulance02.e4p";

And change it to:

const char OBJ_AMBULANCE02[]			= "mod:Prototypes/Vehicles/01 LA Ambulance/ambulance021.e4p";

And your done! That wont remove the regular ALS Ambo and will simply replace all of your ALS Ambos in FS1 with the new LED ALS Ambo.

Link to comment
Share on other sites

Read the post above, i told you the app name.

As for what you want to do, the easiest way is to simply rename ambulance02LED3D.v3o to ambulance02.v3o and then copy that and LightbarRNR.dds to the models folder inside the LA Mod folder. This would replace the regular ALS with the LED Version.

Now if you want to have both the regular ALS and LED ALS available in the mod your going to have to edit latofirestation,lafirestationstart,and latofirestation. The easiest way to do this is grab the app I mentioned above.

In all 3 scripts towards the top find:

const char OBJ_AMBULANCE02[]			= "mod:Prototypes/Vehicles/01 LA Ambulance/ambulance02.e4p";

And change it to:

const char OBJ_AMBULANCE02[]			= "mod:Prototypes/Vehicles/01 LA Ambulance/ambulance021.e4p";

And your done! That wont remove the regular ALS Ambo and will simply replace all of your ALS Ambos in FS1 with the new LED ALS Ambo.

I renamed it to "AMBULANCE02LED", so just switch it out with the "021" right?

BTW: Everything is working fine but it is staffing the three Ambulances with only an EMT Stretcher not the Paramedic FF and Paramedic Stretcher.

What line does it use to staff the guys at FS 1 for the Ambulances?

Link to comment
Share on other sites

is this what your ambulance firestation start script line looks like?

ActorList l7 = Game::GetActors(VO_AMBULANCE01);

for(int i=0; i < l7.GetNumActors(); i++)

{

Vector Ambulance01 = l7.GetActor(0)->GetPosition();

Vehicle m = Game::CreateVehicle(OBJ_AMBULANCE02, UNNAMED);

m.EnableBlueLights(false);

m.SetPosition(Ambulance01);

m.SetRotation(gate1);

m.UpdatePlacement();

m.SetMaxPassengers(2);

m.SetMaxTransports(1);

m.SetSpeed(12.0f);

m.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_CALLCREW, Caller, 1, false);

m.PushActionWait(ACTION_APPEND, 0.5f);

m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 2, false);

}

**EDIT**

also, just thought about this, is this what your firestation ambulance line looks like?

GameObjectList l3;

Game::CollectObstaclesOnVirtualObject(VO_AMBULANCE01, l3, ACTOR_VEHICLE);

if(l3.GetNumObjects() > 0)

{

Vehicle m = l3.GetObject(0);

PersonList passengers = m.GetPassengers();

if (passengers.GetNumPersons() == 0)

{

if(StrCompare(m.GetPrototypeFileName(), OBJ_AMBULANCE01) == 0)

{

m.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_CALLCREW, Caller, 7, false);

//m.PushActionWait(ACTION_APPEND, 0.5f);

//m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 3, false);

} else

{

m.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_CALLCREW, Caller, 1, false);

m.PushActionWait(ACTION_APPEND, 0.5f);

m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 2, false);

}

}

}

Link to comment
Share on other sites

is this what your ambulance firestation start script line looks like?

ActorList l7 = Game::GetActors(VO_AMBULANCE01);

for(int i=0; i < l7.GetNumActors(); i++)

{

Vector Ambulance01 = l7.GetActor(0)->GetPosition();

Vehicle m = Game::CreateVehicle(OBJ_AMBULANCE02, UNNAMED);

m.EnableBlueLights(false);

m.SetPosition(Ambulance01);

m.SetRotation(gate1);

m.UpdatePlacement();

m.SetMaxPassengers(2);

m.SetMaxTransports(1);

m.SetSpeed(12.0f);

m.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_CALLCREW, Caller, 1, false);

m.PushActionWait(ACTION_APPEND, 0.5f);

m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 2, false);

}

**EDIT**

also, just thought about this, is this what your firestation ambulance line looks like?

GameObjectList l3;

Game::CollectObstaclesOnVirtualObject(VO_AMBULANCE01, l3, ACTOR_VEHICLE);

if(l3.GetNumObjects() > 0)

{

Vehicle m = l3.GetObject(0);

PersonList passengers = m.GetPassengers();

if (passengers.GetNumPersons() == 0)

{

if(StrCompare(m.GetPrototypeFileName(), OBJ_AMBULANCE01) == 0)

{

m.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_CALLCREW, Caller, 7, false);

//m.PushActionWait(ACTION_APPEND, 0.5f);

//m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 3, false);

} else

{

m.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_CALLCREW, Caller, 1, false);

m.PushActionWait(ACTION_APPEND, 0.5f);

m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 2, false);

}

}

}

The ambulance starts up fine, and I can use it, but when I return and raise the alarm, it only loads an EMT Strtcher, like the BLS Ambulance at FS 2.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...