Texas_DPS Posted August 27, 2010 Report Share Posted August 27, 2010 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; Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted August 27, 2010 Report Share Posted August 27, 2010 I have been thinking about this out of pure curiosity, and Im wondering if maybe you could do it how the medic w/ emergence case is:p.SetEquipment(EQUIP_K9DOG); Quote Link to comment Share on other sites More sharing options...
Texas_DPS Posted August 28, 2010 Author Report Share Posted August 28, 2010 I tried that, I also tried to spawn the dog seperatly, that didnt work either. I think ill put that on the back burner, take a shot at it a little later. Quote Link to comment Share on other sites More sharing options...