Jump to content
bmxchamp4

Spawning at Police Station?

Recommended Posts

I am currently adding things to freeplay on my game. I am taking all of the civilian cars out of the police station, spawning police cars there, adding a spawn point to the police station, and would very much like to spawn police officers at the station and have them auto staff the police cars. It's pretty much the same scripting as the fire stations just for the police station and I already am working on it and have ideas on how to do it... it may work it may not who knows but so far everything i've done has worked and i now have a ton of police cars ready to go rather than having to spawn my own. I am working on the spawn point as we speak putting it in the station and scripting it. also am going to add a control panel to the police station. The dilemma I'm facing though is how exactly to spawn the police officers. you know how for the firefighters it's like 1 for a paramedic, 3 for a basic FF 6 for the HAZMAT FFs. My question to you all is....................................... what number is associated with police officers if any at all??? and how do you find out these numbers?? is it merely a process of cycling through numbers and loading up the game until you find the one you want?? or is there a way to assign these numbers to the personnel and if so how?? any and all help is very much appreciated. please reply to this message ASAP thanks!!

P.S. Hoppah if you happen to read this help from you would be EXTREMELY appreciated lol

Link to comment
Share on other sites

I assume you are using the LA Mod as a base? That number you're talking about is associated to DummyCallCrew which can be found in LAFireStation.script. Find that script and notice this:

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

That's how the numbers work. If another script refers to DummyCallCrew with number 3 it will spawn an EMT FF, because ChildID == 3 creates the actual person model.

Link to comment
Share on other sites

Thanks for the reply hoppah, but I ended up figuring it out lol.. But I am running into another problem. I've gotten as far as this.

To make a long story short, everything spawns as it should. The game starts everyone and everything spawns including the patrol car. I added a control panel to the police station and added VcmdCallPO to it which is a command I wrote to spawn a police officer. (all I did actually was use the VcmdCallEMT as a template and edited it to spit out an officer lol) anyways when I hit the spawn police officer button on the PD control panel the officer spawns exactly where he should at the PD station and moves exacty where the moveto VO is which is GREAT I'm very pleased tht I've gotten this far.. My problem though is with auto staffing. I edited the LAFireStationStart script to auto staff the patrol cars.. The officers spawn but instead of spawning at the police station they spawn at SPAWN02 at fire station 1 and try to run all they way to the PD and get in the vehicles. Any tips or ideas??

Link to comment
Share on other sites

Anyone? I've been working at it but still haven't been successful. What am I missing?

Link to comment
Share on other sites

Yeah I FINALLY figured it out! tonight! lol. It took me forever to realize that in order to make them spawn in the correct location, I needed to create another VO called squad03. And then it needed to wrap up all the other VOs so that way when it does it's check


if(v.IsCollidingWithVirtualObject([enter VO name here]))

That's how it collected the information on where the spawn was and which spawn they needed to spawn at. I'm excited beyond belief lol this opens up a TON of modding i can do to free play now. Next on my list to add......... Parking spaces lol. That'll be fun.

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