Jump to content
Kingairway

Changing Staff in Spawned Vehicles at Start

Recommended Posts

Hi guys, please tell me if this is already a topic or just move it to one,

 

Id like to know how to Change the staff that spawn in a vehicle at the start of game/ while they are in station.

 

Thanks

K

 

 

P.S I have changed the Unit.xml file and changed the Unit ID to the personnel I want but this does not change in game, what do i need to do? again thanks.

Link to comment
Share on other sites

It's controlled by the "DummyCallCrew" script in LaFireStation. The ChildIDs are what determines which person spawns when using the Station Alarm or the Battalion Chief commands.

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);else if (ChildID == 9)	Person p = Game::CreatePerson(OBJ_DIVER, UNNAMED);

This is the line that you'll see scripts use:

v.PushActionExecuteCommand(ACTION_NEWLIST or ACTION_APPEND, DUMMY_CALLCREW, Caller, ChildID, false);

Replace ChildID with whichever number of the person you want spawned as defined in the "DummyCallCrew" script.

 

Change it in the "VcmdAlarm" script (LAFireStation) for the alarm command, the "VcmdStart" (LAFireStationStart) for game startup spawns, and then any "PcmdCall..." (LABattalionChief) for vehicle call commands.

Link to comment
Share on other sites

It's controlled by the "DummyCallCrew" script in LaFireStation. The ChildIDs are what determines which person spawns when using the Station Alarm or the Battalion Chief commands.

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);else if (ChildID == 9)	Person p = Game::CreatePerson(OBJ_DIVER, UNNAMED);

This is the line that you'll see scripts use:

v.PushActionExecuteCommand(ACTION_NEWLIST or ACTION_APPEND, DUMMY_CALLCREW, Caller, ChildID, false);

Replace ChildID with whichever number of the person you want spawned as defined in the "DummyCallCrew" script.

 

Change it in the "VcmdAlarm" script (LAFireStation) for the alarm command, the "VcmdStart" (LAFireStationStart) for game startup spawns, and then any "PcmdCall..." (LABattalionChief) for vehicle call commands.

It gets confusing with 2 stations but do you need to also get the LAfirestation.script and the LAfirestationstart.script? As in change both or just the LAfirestationstart.script?

Link to comment
Share on other sites

It gets confusing with 2 stations but do you need to also get the LAfirestation.script and the LAfirestationstart.script? As in change both or just the LAfirestationstart.script?

 

FireStation contains the Alarm command, and the CallCrew command (in case you need reference or wish to change/add options). FireStationStart contains the startup script that spawns vehicles and crews them when you start a freeplay; it's setup like an initial station alarm, but it's completely separate. And then there's the BattalionChief commands that deal with calling vehicles using the supervisor units.

Link to comment
Share on other sites

FireStation contains the Alarm command, and the CallCrew command (in case you need reference or wish to change/add options). FireStationStart contains the startup script that spawns vehicles and crews them when you start a freeplay; it's setup like an initial station alarm, but it's completely separate. And then there's the BattalionChief commands that deal with calling vehicles using the supervisor units.

Awesome that makes sense, im just concerned with adjusting the 2 FFs that spawn at start in an ambulance, but the ChildID #'s dont corrolate with what spawns or It shows it like this:

 

 

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

 

 

 

 

At start it's 2 FF w a stretcher but Id just prefer 2 FFs no stretcher

Link to comment
Share on other sites

Both of those numbers should be the same if you want two of the same person. If you want paramedics, the number should be one; 3 for EMTs.

 

Thanks for your help, New question, I am looking for the Child ID of my paramedics but I cannot find them, the paramedics are what I want to spawn in my Ambulances so far its just FF/Paramedics- not want I want lol

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