Jump to content
SirMoo

EMS Captain - Equip Bag

Recommended Posts

So I traded out the firefighter for the EMS Captain in the Battalion Chief car... That part was easy, but he never equips his bag automatically. Here is what I have in the files.

First I modified the child id for EMS Captain to have a bag... File Ref: LAFireStation.script

		PersonList passengers = v.GetPassengers();
if (ChildID == 1)
{
Person p = Game::CreatePerson(OBJ_PM, UNNAMED);
p.SetEquipment(EQUIP_EMERGENCY_CASE);
}
else if (ChildID == 2)
Person p = Game::CreatePerson(OBJ_PM_STRETCHER, UNNAMED);
else if (ChildID == 3)
Person p = Game::CreatePerson(OBJ_EMT, UNNAMED);
else if (ChildID == 4)
Person p = Game::CreatePerson(OBJ_CHIEF, UNNAMED);
else if (ChildID == 5)
Person p = Game::CreatePerson(OBJ_HAZMAT, UNNAMED);
else if (ChildID == 6)
Person p = Game::CreatePerson(OBJ_USARFF, UNNAMED);
else if (ChildID == 7)
Person p = Game::CreatePerson(OBJ_EMT_STRETCHER, UNNAMED);
else if (ChildID == 8)
{
Person p = Game::CreatePerson(OBJ_EMS_CAPTAIN, UNNAMED);
p.SetEquipment(EQUIP_EMERGENCY_CASE);
}
else

This did what I want and gave him a bag, BUT the bag is unusable and I can set it down nor can I do any other actions except move around and get into the vehicle

I thought I need to modify the EMS Cap when he's in the vehicle and I did not really know what I was doing but I added a tiny command not really understanding what it does. -shrugs.- File Ref: LAFireStationStart.script

		ActorList l6 = Game::GetActors(VO_BATTALION);
for(int i=0; i < l6.GetNumActors(); i++)
{
Vector Battalion = l6.GetActor(0)->GetPosition();
Vehicle m = Game::CreateVehicle(OBJ_BATTALION, UNNAMED);
m.EnableBlueLights(false);
m.SetPosition(Battalion);
m.UpdatePlacement();
m.SetMaxPassengers(2);
m.SetSpeed(12.0f);
m.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_CALLCREW, Caller, 4, false);
m.PushActionWait(ACTION_APPEND, 0.5f);
m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 8, false);
m.PushActionWait(ACTION_APPEND, 0.5f);
}

So what exactly do I need to do to fix this problem?

Link to comment
Share on other sites

Instead of

		else if (ChildID == 8)
{
Person p = Game::CreatePerson(OBJ_EMS_CAPTAIN, UNNAMED);
p.SetEquipment(EQUIP_EMERGENCY_CASE);
}

Try

		else if (ChildID == 8)
{
Person p = Game::CreatePerson(OBJ_EMS_CAPTAIN, UNNAMED);
p.SetEquipment(EQUIP_EMERGENCY_CASE);
p.PushActionExecuteCommand(ACTION_INSERT, "DummyEquipmentCommands", Target, 9, false);
}

Unlike the FF/PM the EMT captain does not have the EMT bag for default, so it does not have the appropiate commands. The extra code refers to a script which assigns and removes the correct commands when a unit gets the EMT bag.

Hoppah

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...