Maffegozer Posted May 7, 2010 Report Share Posted May 7, 2010 Hello,Since a few days I have a private mod based on the NL Mod Alpha 2.I've got an alarming script ready and working.But the problem is the parking script.When I've alarmed the units.And send them to the parking.They..WellHere's a vid of my problem:Video Parkingscript Problem.My parking script:// ParkAtBase-Script (c) a-rescue | its not allowed to remove this lineconst char IMG[] = "gohome";int DummyGroup = "90";object ParkingAlles : CommandScript{ ParkingAlles() { 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); ActorList al; Actor parkplatz; Vector parkpos; Vector anfahrpos; Vector wendepos; PersonList pl; // car detection, parking place detection and approach and turn settings/////// CAR 1 /////////////////////////////////////////////////////////////////////////////////////////////////////////// if (v.HasName("NOODHULP_01")) // * car-name { al=Game::GetActors("NOODHULP_PARK_01"); // * 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) } else/////// CAR 2 /////////////////////////////////////////////////////////////////////////////////////////////////////////// if (v.HasName("NOODHULP_02")) // * car-name { al=Game::GetActors("NOODHULP_PARK_02"); // * 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) } else/////// CAR 3 /////////////////////////////////////////////////////////////////////////////////////////////////////////// if (v.HasName("NOODHULP_03")) // * car-name { al=Game::GetActors("NOODHULP_PARK_03"); // * 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) } else/////// CAR 4 /////////////////////////////////////////////////////////////////////////////////////////////////////////// if (v.HasName("NOODHULP_04")) // * car-name { al=Game::GetActors("NOODHULP_PARK_04"); // * 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) } 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); v.PushActionMove(ACTION_NEWLIST, parkpos+anfahrpos); v.PushActionTurnTo(ACTION_APPEND, parkpos+wendepos); v.PushActionMove(ACTION_APPEND, parkpos); }};No errors come but it just doesn't go to the spot right.VO's are behind the vehicles at the start. Link to comment Share on other sites More sharing options...
Texas_DPS Posted May 7, 2010 Report Share Posted May 7, 2010 have you tried to switch the return vo's to the front? Link to comment Share on other sites More sharing options...
Maffegozer Posted May 7, 2010 Author Report Share Posted May 7, 2010 Well, Actually I know what the problem is now...Because I fixed the thing of parking space.But now it parks the other way(180 degrees turn so it stands exactly WRONG. So gotta fix that and it's solved)-edit-Yep fixed...Topic lock please. Link to comment Share on other sites More sharing options...