Jump to content


Photo

Changing units


  • Please log in to reply
33 replies to this topic

#1 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 05 April 2010 - 09:45 AM

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.

AePdW0F.png0CpxYIV.pngKO3tGvP.png


#2 andrew2007

andrew2007

    Senior Captain

  • Members
  • 288 posts
  • Gender:Male
  • Location:Australia

Posted 05 April 2010 - 09:47 AM

How have you got these? As brand new units?

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


Submod: Even More Additional Units

#3 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 05 April 2010 - 09:53 AM

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.

AePdW0F.png0CpxYIV.pngKO3tGvP.png


#4 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 05 April 2010 - 07:58 PM

Any help?

AePdW0F.png0CpxYIV.pngKO3tGvP.png


#5 MikeyPI

MikeyPI

    Heil kitler

  • Moderator
  • 667,284 posts
  • Gender:Male
  • Location:<Undisclosed>
  • Interests:Drinking booze, guns, and cars, when combined it can be really entertaining=)

Posted 06 April 2010 - 02:10 PM

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.

Lazy Moderator - Will warn when agro >)
FLM.jpg
2z69r10.jpg
Executive Director, EMP Internment Camps

 


#6 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 10 April 2010 - 11:23 PM

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!

AePdW0F.png0CpxYIV.pngKO3tGvP.png


#7 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 11 April 2010 - 02:51 AM

NEWS: 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?

AePdW0F.png0CpxYIV.pngKO3tGvP.png


#8 pyrothijs

pyrothijs

    Assistant Chief

  • Members
  • 2,472 posts
  • Gender:Male
  • Location:Lelystad, the Netherlands
  • Interests:Everything that has to do with the Fire Department.

Posted 11 April 2010 - 12:39 PM

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.

greetz,PyroThijs, (Moderator/FAQ author)
See something that doesn't belong? Report it, don't take matters into your own hands.
Posted Image
Posted Image
Posted Image


#9 Conroy

Conroy

    Captain

  • Members
  • 136 posts
  • Gender:Male
  • Location:Scotland

Posted 11 April 2010 - 02:31 PM

This mod replaces the ambulance at FS1 anyway..

snp2nRi.gif


#10 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 11 April 2010 - 05:01 PM

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...

AePdW0F.png0CpxYIV.pngKO3tGvP.png


#11 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 13 April 2010 - 12:51 AM

NEWS: Now, I've edited the scripts so that it will at least go to FS but it won't open the doors and enter.

Does anyone know how to make the doors open?

AePdW0F.png0CpxYIV.pngKO3tGvP.png


#12 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 17 April 2010 - 07:17 AM

NEWS: Fixed everything, got the Ambulance to go to station with no problems.

AePdW0F.png0CpxYIV.pngKO3tGvP.png


#13 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 19 April 2010 - 06:30 AM

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?

AePdW0F.png0CpxYIV.pngKO3tGvP.png


#14 Xplorer4x4

Xplorer4x4

    Assistant Chief

  • Members
  • 4,972 posts
  • Gender:Male
  • Location:Evansville,IN

Posted 19 April 2010 - 11:18 AM

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.

Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.

Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
MyDfQUt.jpg

Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE

If you appreciate my work, then please donate. Every little bit helps!
btn_donate_SM.gif


#15 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 19 April 2010 - 04:05 PM

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".

AePdW0F.png0CpxYIV.pngKO3tGvP.png


#16 Xplorer4x4

Xplorer4x4

    Assistant Chief

  • Members
  • 4,972 posts
  • Gender:Male
  • Location:Evansville,IN

Posted 19 April 2010 - 06:49 PM

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.

Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.

Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
MyDfQUt.jpg

Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE

If you appreciate my work, then please donate. Every little bit helps!
btn_donate_SM.gif


#17 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 20 April 2010 - 03:00 AM

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?

AePdW0F.png0CpxYIV.pngKO3tGvP.png


#18 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 22 April 2010 - 04:24 PM

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?

Any help?

AePdW0F.png0CpxYIV.pngKO3tGvP.png


#19 Texas_DPS

Texas_DPS

    Battalion Chief

  • Members
  • 792 posts
  • Gender:Male

Posted 23 April 2010 - 04:12 PM

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);
}
}
}
- Jon

#20 EM4life

EM4life

    Battalion Chief

  • Members
  • 570 posts
  • Gender:Male
  • Location:California, USA
  • Interests:Life.

Posted 24 April 2010 - 03:01 AM

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.

AePdW0F.png0CpxYIV.pngKO3tGvP.png