
Changing units
#2
Posted 05 April 2010 - 09:47 AM
It'd be just as easy to overwrite the old with the new.
#3
Posted 05 April 2010 - 09:53 AM
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.How have you got these? As brand new units?
It'd be just as easy to overwrite the old with the new.
#5
Posted 06 April 2010 - 02:10 PM
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 >)
Executive Director, EMP Internment Camps
#6
Posted 10 April 2010 - 11:23 PM
Thanks a bunch!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.
#8
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.
#9
Posted 11 April 2010 - 02:31 PM
#10
Posted 11 April 2010 - 05:01 PM
It already has that command, yet it says "vehicle does not belong in the fire station!"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.
No it doesn't...I had to do that myself...This mod replaces the ambulance at FS1 anyway..
#14
Posted 19 April 2010 - 11:18 AM
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.
Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE
If you appreciate my work, then please donate. Every little bit helps!
#15
Posted 19 April 2010 - 04:05 PM
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)"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.
The USAR is the same for all other vehicles, except the ambulance which is always "VT_AMBULANCE_RTW".
#16
Posted 19 April 2010 - 06:49 PM
Read the post above, i told you the app name.First, how do I find line say 350
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.
Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE
If you appreciate my work, then please donate. Every little bit helps!
#17
Posted 20 April 2010 - 03:00 AM
I renamed it to "AMBULANCE02LED", so just switch it out with the "021" right?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.
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?
#19
Posted 23 April 2010 - 04:12 PM
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);
}
}
}
#20
Posted 24 April 2010 - 03:01 AM
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.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);
}
}
}