Jump to content
jumping

mod question

Recommended Posts

Add the parking spots on the game editor using the same format as what already appears! Make sure to change the numbers to the next inline 6, 7, 8, 9. and so on,

In the script find where the parking space are listed in the objects list and add them under the ones there! ( copy and past makes this really simple! )

Next find where you need to add the new spots in the actual script!

Once again copy the one of the old codes and past then just simply change to match the new parking spaces

Note! This dosn't requier deleting, cuting, or removing any thing and if you do it will mess the script up. below shows what you will need to look for in the script!

What the object list looks like

const char VO_PARK01[] = "p01";
const char VO_PARK02[] = "p02";
const char VO_PARK03[] = "p03";
const char VO_PARK04[] = "p04";
const char VO_PARK05[] = "p05";
const char VO_PARK06[] = "p06";

What the codes in the script looks like

bool ParkinglotFound = false;
bool ToDonut = false;
ActorList l1;
if (!ParkinglotFound)
{
GameObjectList l2;
Game::CollectObstaclesOnVirtualObject(VO_PARK01, l2, ACTOR_VEHICLE);
if(l2.GetNumObjects() == 0)
{
l1 = Game::GetActors(VO_PARK01);
ParkinglotFound = true;
}
}
if (!ParkinglotFound)
{
GameObjectList l3;
Game::CollectObstaclesOnVirtualObject(VO_PARK02, l3, ACTOR_VEHICLE);
if(l3.GetNumObjects() == 0)
{
l1 = Game::GetActors(VO_PARK02);
ParkinglotFound = true;
}
}
if (!ParkinglotFound)
{
GameObjectList l4;
Game::CollectObstaclesOnVirtualObject(VO_PARK03, l4, ACTOR_VEHICLE);
if(l4.GetNumObjects() == 0)
{
l1 = Game::GetActors(VO_PARK03);
ParkinglotFound = true;
}
}
if (!ParkinglotFound)
{
GameObjectList l5;
Game::CollectObstaclesOnVirtualObject(VO_PARK04, l5, ACTOR_VEHICLE);
if (!l5.ContainsSquad())
{
l1 = Game::GetActors(VO_PARK04);
ParkinglotFound = true;
ToDonut = true;
}
}
if (!ParkinglotFound)
{
GameObjectList l6;
Game::CollectObstaclesOnVirtualObject(VO_PARK05, l6, ACTOR_VEHICLE);
if (!l6.ContainsSquad())
{
l1 = Game::GetActors(VO_PARK05);
ParkinglotFound = true;
ToDonut = true;
}
}
if (!ParkinglotFound)
{
GameObjectList l7;
Game::CollectObstaclesOnVirtualObject(VO_PARK06, l7, ACTOR_VEHICLE);
if (!l6.ContainsSquad())
{
l1 = Game::GetActors(VO_PARK06);
ParkinglotFound = true;
ToDonut = true;
}
}

if (!ParkinglotFound)
{
v.PushActionExecuteCommand(ACTION_NEWLIST, CMD_PATROL, Caller, 0, false);
return;
}

&

 if(ChildID == 2)
{
Vehicle v(Caller);
v.EnableBlinker(BLT_NONE);
bool ToPoliceStation = false;
if (v.IsCollidingWithVirtualObject(VO_PARK01))
return;
else
ToPoliceStation = true;
if (v.IsCollidingWithVirtualObject(VO_PARK02))
return;
else
ToPoliceStation = true;
if (v.IsCollidingWithVirtualObject(VO_PARK03))
return;
else
ToPoliceStation = true;
if (v.IsCollidingWithVirtualObject(VO_PARK04))
return;
else
ToPoliceStation = true;
if (v.IsCollidingWithVirtualObject(VO_PARK05))
return;
else
ToPoliceStation = true;
if (v.IsCollidingWithVirtualObject(VO_PARK06))
return;
else
ToPoliceStation = true;

Link to comment
Share on other sites

What you can also do is move park04 and 05, in addition to 06, to the police station on the map, then comment out the "todonut=true" lines in the script by adding "//" to the front, and they will drop off passengers at the station.

Also, if you want to be able to call backup from them, you have to add them to the CallPatrolCar script. Do the same for the "const char VO_PARK" at the top, and then add those VOs to the line starting with "if (aCar->GetPlayerMP()"

e.g. add "aCar->IsCollidingWithVirtualObject(VO_PARK04)" etc if they aren't there already.

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