Jump to content
Texas_DPS

spawning K9 Handler with K9

Recommended Posts

I have been working on some stuff and have just moved to the police side. I am trying to spawn the k9 unit (dog and handler) at startup. I can spawn the handler just not the dog.

			GameObjectList l25;
Game::CollectObstaclesOnVirtualObject(VO_K9, l25, ACTOR_VEHICLE);
if(l25.GetNumObjects() > 0)
{
Vehicle m = l25.GetObject(0);
PersonList passengers = m.GetPassengers();
if (passengers.GetNumPersons() == 0)
{
m.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_CALLCREW, Caller, 13, false);
}
}

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_LAPD_OFFICER, UNNAMED);
else if (ChildID == 9)
Person p = Game::CreatePerson(OBJ_NEGOTIATOR, UNNAMED);
else if (ChildID == 10)
Person p = Game::CreatePerson(OBJ_SCOUT, UNNAMED);
else if (ChildID == 11)
Person p = Game::CreatePerson(OBJ_SWAT_OFFICER, UNNAMED);
else if (ChildID == 12)
Person p = Game::CreatePerson(OBJ_BOMB_SQUAD, UNNAMED);
else if (ChildID == 13)
Person p = Game::CreatePerson(OBJ_K9, UNNAMED);
else
return;

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