Jump to content
RedHawk504

Help needed

Recommended Posts

Hello everyone,

I made some changes in a existing ParkAtBase script. I managed it to let go the vehicles to their parking places. But how they park isnt the right way. They park straigt up or straight to the right. Not like a 45 degree posistion. But in the script is written went posistion and park posittion. What do i need to change or what are the specs to let the car park at a 45 degree angle?

Also when i'm send them back to their parking spots the firefighters wont go out and dissapear? What do i also have to change/make to let that work?

Greetings from RedHawk504

Link to comment
Share on other sites

Do you mean LAToFirestation.script? In which case you'd need to show pics of what you're getting in game :)

No not that script.

Spoiler of the Script i used.

// ParkAtBase-Script © a-rescue | its not allowed to remove this line

const char IMG[] = "gowache";

int DummyGroup = "90";

const char AlarmSound[] = "mod:Audio/Sounds/park.wav";

object ParkAtBase : CommandScript

{

ParkAtBase()

{

SetIcon(IMG);

SetCursor(IMG);

SetValidTargets(ACTOR_VEHICLE);

SetRestrictions(RESTRICT_SELFEXECUTE);

SetPossibleCallers(ACTOR_VEHICLE);

SetGroupID(DummyGroup);

}

bool CheckGroupVisibility(GameObject *Caller)

{

return true;

}

bool CheckPossible(GameObject *Caller)

{

if (!Caller->IsValid() || Caller->GetType() != ACTOR_VEHICLE)

return false;

Vehicle v(Caller);

if (v.IsValid() && !v.IsDestroyed())

{

return true;

}

return false;

}

bool CheckTarget(GameObject *Caller, Actor *Target, int ChildID)

{

if (!Caller->IsValid() || !Target->IsValid() || Caller->GetID() != Target->GetID())

return false;

Vehicle v(Caller);

if (v.IsValid() && !v.IsDestroyed())

{

return true;

}

return false;

}

void PushActions(GameObject *Caller, Actor *Target, int childID)

{

Vehicle v(Caller);

if (v.HasCommand("DUMMYHasWarningLights"))

{

Game::ExecuteCommand("VCmdWarningLightsOff", &v, &v);

}

if (v.HasCommand("DUMMYHasSpecialLights"))

{

Game::ExecuteCommand("VCmdSpecialLightsOff", &v, &v);

}

if (v.IsBlueLightEnabled())

{

Game::ExecuteCommand("VCmdBlueLightsOff", &v, &v);

}

if (v.HasCommand("DUMMYHasSiren"))

{

Game::ExecuteCommand("DUMMYDisableSiren", &v, &v);

}

if (v.HasCommand("DUMMYHasAutoSiren"))

{

Game::ExecuteCommand("VCmdAutoSirenOff", &v, &v);

}

if(v.IsInstalled())

{

return; // Wenn DLK aufgebaut ist, oder ein Schlauch am Fahrzeug angeschlossen ist!

}

Vehicle v(Caller);

ActorList al;

Actor parkplatz;

Vector parkpos;

Vector anfahrpos;

Vector wendepos;

PersonList pl;

{

Audio::PlaySample(AlarmSound);

}

// car detection, parking place detection and approach and turn settings

/////// CAR 1 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("halfzwareautopomp")) // * car-name

{

al=Game::GetActors("park1"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 2 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("DLK2")) // * car-name

{

al=Game::GetActors("park2"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 3 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("DLK3")) // * car-name

{

al=Game::GetActors("park3"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 4 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("swagen")) // * car-name

{

al=Game::GetActors("park4"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 5 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("dwagen")) // * car-name

{

al=Game::GetActors("park5"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 6 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("tankwagen2")) // * car-name

{

al=Game::GetActors("park6"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 7 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("DLK4")) // * car-name

{

al=Game::GetActors("park7"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 8 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("hv")) // * car-name

{

al=Game::GetActors("park8"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 9 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("haakarm")) // * car-name

{

al=Game::GetActors("park9"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 10 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("tankwagen")) // * car-name

{

al=Game::GetActors("park10"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 11 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("a3pomp")) // * car-name

{

al=Game::GetActors("park11"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 12 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("cvito")) // * car-name

{

al=Game::GetActors("park12"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 13 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("adem")) // * car-name

{

al=Game::GetActors("park13"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 14 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("a2pomp")) // * car-name

{

al=Game::GetActors("park14"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

{

Mission::PlayHint("Can't find the parking place for this car - Coordinates");

return;

}

// Parkplatzpos.erkennung

if(al.GetNumActors() > 0)

{

parkplatz = *al.GetActor(0);

parkpos = parkplatz.GetPosition();

}

else

{

Mission::PlayHint("Can't find the parking place for this car - Virtual object");

return;

}

// Einparken

Game::FindFreePosition(&v, parkpos);

if (v.HasName("lifeliner1"))

{

GameObject obje(Target);

float VUmc = v.GetValidLandingAngle(&obje, parkpos);

Caller->PushActionFlyTo(ACTION_NEWLIST, parkpos, true, VUmc);

}

else

{

v.PushActionMove(ACTION_NEWLIST, parkpos+anfahrpos);

v.PushActionTurnTo(ACTION_APPEND, parkpos+wendepos);

v.PushActionMove(ACTION_APPEND, parkpos);

}

v.RemoveCommand("DummyBeschikbaar");

v.PushActionExecuteCommand(ACTION_APPEND, "VcmdDelete", Caller, 1, true);

v.PushActionExecuteCommand(ACTION_APPEND, "Beschikbaar", Caller, 0, false);

//v.PushActionExecuteCommand(ACTION_APPEND, "Beschikbaar", Caller, 0, false);

}

};

Link to comment
Share on other sites

No not that script.

Spoiler of the Script i used.

// ParkAtBase-Script © a-rescue | its not allowed to remove this line

const char IMG[] = "gowache";

int DummyGroup = "90";

const char AlarmSound[] = "mod:Audio/Sounds/park.wav";

object ParkAtBase : CommandScript

{

ParkAtBase()

{

SetIcon(IMG);

SetCursor(IMG);

SetValidTargets(ACTOR_VEHICLE);

SetRestrictions(RESTRICT_SELFEXECUTE);

SetPossibleCallers(ACTOR_VEHICLE);

SetGroupID(DummyGroup);

}

bool CheckGroupVisibility(GameObject *Caller)

{

return true;

}

bool CheckPossible(GameObject *Caller)

{

if (!Caller->IsValid() || Caller->GetType() != ACTOR_VEHICLE)

return false;

Vehicle v(Caller);

if (v.IsValid() && !v.IsDestroyed())

{

return true;

}

return false;

}

bool CheckTarget(GameObject *Caller, Actor *Target, int ChildID)

{

if (!Caller->IsValid() || !Target->IsValid() || Caller->GetID() != Target->GetID())

return false;

Vehicle v(Caller);

if (v.IsValid() && !v.IsDestroyed())

{

return true;

}

return false;

}

void PushActions(GameObject *Caller, Actor *Target, int childID)

{

Vehicle v(Caller);

if (v.HasCommand("DUMMYHasWarningLights"))

{

Game::ExecuteCommand("VCmdWarningLightsOff", &v, &v);

}

if (v.HasCommand("DUMMYHasSpecialLights"))

{

Game::ExecuteCommand("VCmdSpecialLightsOff", &v, &v);

}

if (v.IsBlueLightEnabled())

{

Game::ExecuteCommand("VCmdBlueLightsOff", &v, &v);

}

if (v.HasCommand("DUMMYHasSiren"))

{

Game::ExecuteCommand("DUMMYDisableSiren", &v, &v);

}

if (v.HasCommand("DUMMYHasAutoSiren"))

{

Game::ExecuteCommand("VCmdAutoSirenOff", &v, &v);

}

if(v.IsInstalled())

{

return; // Wenn DLK aufgebaut ist, oder ein Schlauch am Fahrzeug angeschlossen ist!

}

Vehicle v(Caller);

ActorList al;

Actor parkplatz;

Vector parkpos;

Vector anfahrpos;

Vector wendepos;

PersonList pl;

{

Audio::PlaySample(AlarmSound);

}

// car detection, parking place detection and approach and turn settings

/////// CAR 1 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("halfzwareautopomp")) // * car-name

{

al=Game::GetActors("park1"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 2 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("DLK2")) // * car-name

{

al=Game::GetActors("park2"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 3 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("DLK3")) // * car-name

{

al=Game::GetActors("park3"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 4 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("swagen")) // * car-name

{

al=Game::GetActors("park4"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 5 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("dwagen")) // * car-name

{

al=Game::GetActors("park5"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 6 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("tankwagen2")) // * car-name

{

al=Game::GetActors("park6"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 7 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("DLK4")) // * car-name

{

al=Game::GetActors("park7"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 8 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("hv")) // * car-name

{

al=Game::GetActors("park8"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 9 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("haakarm")) // * car-name

{

al=Game::GetActors("park9"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 10 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("tankwagen")) // * car-name

{

al=Game::GetActors("park10"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 11 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("a3pomp")) // * car-name

{

al=Game::GetActors("park11"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 12 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("cvito")) // * car-name

{

al=Game::GetActors("park12"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 13 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("adem")) // * car-name

{

al=Game::GetActors("park13"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////// CAR 14 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

if (v.HasName("a2pomp")) // * car-name

{

al=Game::GetActors("park14"); // * parking place name (virtual object)

anfahrpos = Vector (0,300,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

wendepos = Vector (0,600,0); // * vector (x,y,z) minus values with minus (-x,-y,-z)

v.EnableBlueLights(false);

v.SetSpeed(6.4f);

}

else

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

{

Mission::PlayHint("Can't find the parking place for this car - Coordinates");

return;

}

// Parkplatzpos.erkennung

if(al.GetNumActors() > 0)

{

parkplatz = *al.GetActor(0);

parkpos = parkplatz.GetPosition();

}

else

{

Mission::PlayHint("Can't find the parking place for this car - Virtual object");

return;

}

// Einparken

Game::FindFreePosition(&v, parkpos);

if (v.HasName("lifeliner1"))

{

GameObject obje(Target);

float VUmc = v.GetValidLandingAngle(&obje, parkpos);

Caller->PushActionFlyTo(ACTION_NEWLIST, parkpos, true, VUmc);

}

else

{

v.PushActionMove(ACTION_NEWLIST, parkpos+anfahrpos);

v.PushActionTurnTo(ACTION_APPEND, parkpos+wendepos);

v.PushActionMove(ACTION_APPEND, parkpos);

}

v.RemoveCommand("DummyBeschikbaar");

v.PushActionExecuteCommand(ACTION_APPEND, "VcmdDelete", Caller, 1, true);

v.PushActionExecuteCommand(ACTION_APPEND, "Beschikbaar", Caller, 0, false);

//v.PushActionExecuteCommand(ACTION_APPEND, "Beschikbaar", Caller, 0, false);

}

};

What mod is that from?

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