Ghost Graphic Designs Posted February 23, 2015 Report Share Posted February 23, 2015 Hi. I'm currently in the process of changing a freeplay map for my modification. I had to re-add all of the VOs, vehicles and stations to the new map. All of the alarm scripts are working without any trouble and the vehicles were placed exactly where they were in the original map. The problem is that whenever a unit is sent back to the parking spot, I get a message telling me that there's no space available at the fire station. So, still ingame, I emptied the fire station and was only able to park the unit when there were none parked. I figured out that it was related to the vehicles physics, so I removed all of the fire station's physics and also shrinked the vehicles' physics to see if they parked correctly. I made no changes to the "Back to station" script since the last version, triple checked the VOs, the script, deleted the station, all of the surrounding buildings, also changed the position of the station and even moved the VOs a little bit away from each other, but no changes. This is really letting me down, because it worked fine in the previous version and the vehicles were really close from each other and there was no script problem at all. The only change I made was adding some gates to the fire station (I also made them freely accessible and removed all physics). I'm hoping that someone finds out what's going on. Meanwhile, I'll try to recover the script from the last version and use it instead, maybe something went wrong. EDIT: Nope. Still the same. Script://******************************************************************************************// #Version 1.5#//// Includes: To parking command.//// - VcmdToFireStation//// Script by Hoppah | Edited by GGD// // Usage of this script in other mods is NOT allowed without permission of Hoppah////******************************************************************************************const char CMD_SIREN[] = "VcmdSiren";const char CMD_AUTOSIREN_OFF[] = "VcmdAutoSirenOff";const char CMD_WARNINGLIGHTS[] = "VcmdWarningLightsOn";const char DUMMY_WARNINGLIGHTS[] = "DummyHasWarningLights";const char CMD_FLOODLIGHTS_OFF[] = "VcmdFloodLightsOff";const char CMD_FLOODLIGHTS_ON[] = "VcmdFloodLightsOn";const char CMD_GETTILLER[] = "VcmdGetTiller";const char CMD_FLASHINGLIGHTS[] = "VcmdFlashingLights";const char CMD_GOHOME[] = "GoHome";const char CMD_TOHOSPITAL[] = "VcmdToHospital";const char CMD_TOFIRESTATION[] = "RSBToFireStation";const char CMD_PATROL[] = "VcmdPatrol";const char CMD_STANDBY_ON[] = "VcmdStandbyOn";const char CMD_STANDBY_OFF[] = "VcmdStandbyOff";const char CMD_GETTILLER[] = "VcmdGetTiller";const char DUMMY_TILLERGOHOME[] = "DummyTillerGoHome";const char DUMMY_DISABLE[] = "DummyDisableSiren";const char DUMMY_HASSIREN[] = "DummyHasSiren";const char DUMMY_PATROL[] = "DummyPatrol";const char DUMMY_GATES[] = "DummyGates";const char DUMMY_FIRESTATION[] = "DummyAtFireStation";const char DUMMY_CHECKPARKED[] = "DummyCheckParked";const char DUMMY_ISTRAILED[] = "DummyIsTrailed";const char DUMMY_VCALLED[] = "DummyVehicleCalled";const char DUMMY_HOSESON[] = "DummyHosesAreOn";const char DUMMY_TILLER[] = "DummyTiller";const char DUMMY_HASLIGHTS[] = "DummyHasLights";const char DUMMY_ENABLE[] = "DummyEnableLights";const char DUMMY_DISABLE[] = "DummyDisableLights";const char DUMMYGOHOME_V[] = "DUMMYFPGoHome2";const char DUMMYGOHOME_P[] = "DUMMYFPGoHomePersonal2";const char COMMANDABLE_TRUE[] = "DUMMYSetCommandableTrue";const char COMMANDABLE_FALSE[] = "DUMMYSetCommandableFalse";const char FREEFORALERT_TRUE[] = "DUMMYFPSetFreeForAlertTrue";const char FREEFORALERT_FALSE[] = "DUMMYFPSetFreeForAlertFalse";const char FREEFORALERT[] = "DUMMYFPIsFreeForAlert";const char INBASE_TRUE[] = "DUMMYFPSetInBaseTrue";const char INBASE_FALSE[] = "DUMMYFPSetInBaseFalse";const char INBASE[] = "DUMMYFPIsInBase"; bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; if (!Game::IsFreeplay() && !Game::IsMultiplayer()) return false; return true; }// VEHICLES TO PARK LALALALALALALALALLALALALALALAconst char OBJ_PATROL01[] = "mod:Prototypes/Vehicles/01 BV Lisbonenses/ABSC_01_NEW.e4p";const char OBJ_PATROL02[] = "mod:Prototypes/Vehicles/01 BV Lisbonenses/ABSC_02.e4p";const char OBJ_PATROL03[] = "mod:Prototypes/Vehicles/01 BV Lisbonenses/ABSC_03.e4p";const char OBJ_PATROL04[] = "mod:Prototypes/Vehicles/01 BV Lisbonenses/ABSC_04.e4p";const char OBJ_PATROL05[] = "mod:Prototypes/Vehicles/01 BV Lisbonenses/ABSC_05.e4p";const char OBJ_PATROL06[] = "mod:Prototypes/Vehicles/01 BV Lisbonenses/ABSC_06.e4p";const char OBJ_PATROL07[] = "mod:Prototypes/Vehicles/01 BV Lisbonenses/VUCI_04.e4p";const char OBJ_PATROL08[] = "mod:Prototypes/Vehicles/01 BV Lisbonenses/VLCI_01.e4p";const char OBJ_PATROL09[] = "mod:Prototypes/Vehicles/01 BV Lisbonenses/VCOT_01.e4p";const char OBJ_PATROL10[] = "mod:Prototypes/Vehicles/01 BV Lisbonenses/VFCI_03.e4p";const char OBJ_PATROL11[] = "mod:Prototypes/Vehicles/01 BV Lisbonenses/VTTU_01.e4p";const char OBJ_PATROL12[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VLCI_31.e4p";const char OBJ_PATROL13[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VUCI_32.e4p";const char OBJ_PATROL14[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VUCI_22.e4p";const char OBJ_PATROL15[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VE_37.e4p";const char OBJ_PATROL16[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/ABSC_33.e4p";const char OBJ_PATROL17[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/ABSC_34.e4p";const char OBJ_PATROL18[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VSAT_51.e4p";const char OBJ_PATROL19[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VCOT_62.e4p";const char OBJ_PATROL20[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VTPG_53.e4p";const char OBJ_PATROL21[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VTTU_21.e4p";const char OBJ_PATROL22[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VTTU_51.e4p";const char OBJ_PATROL23[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VLCI_22.e4p";const char OBJ_PATROL24[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VAME_01.e4p";const char OBJ_PATROL25[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VECI_54.e4p";const char OBJ_PATROL26[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/UCA_1.e4p";const char OBJ_PATROL27[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VSAE_01.e4p";const char OBJ_PATROL28[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/AA_77.e4p";const char OBJ_PATROL29[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/CT_4.e4p";const char OBJ_PATROL30[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VCOC_51.e4p";const char OBJ_PATROL31[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/VOPE_16.e4p";const char OBJ_PATROL32[] = "mod:Prototypes/Vehicles/02 RSB Lisboa/AC_51.e4p";const char OBJ_PATROL33[] = "mod:Prototypes/Vehicles/INEM/VMER_SJ.e4p";const char VO_P1[] = "ABSC01_park";const char VO_P1PAD[] = "ABSC01_pad";const char VO_P1TURN[] = "ABSC01_turn";const char VO_P2[] = "ABSC02_park";const char VO_P2PAD[] = "ABSC02_pad";const char VO_P2TURN[] = "ABSC02_turn";const char VO_P3[] = "ABSC03_park";const char VO_P3PAD[] = "ABSC03_pad";const char VO_P3TURN[] = "ABSC03_turn";const char VO_P4[] = "ABSC04_park";const char VO_P4PAD[] = "ABSC04_pad";const char VO_P4TURN[] = "ABSC04_turn";const char VO_P5[] = "ABSC05_park";const char VO_P5PAD[] = "ABSC05_pad";const char VO_P5TURN[] = "ABSC05_turn";const char VO_P6[] = "ABSC06_park";const char VO_P6PAD[] = "ABSC06_pad";const char VO_P6TURN[] = "ABSC06_turn";const char VO_P7[] = "VUCI04_park";const char VO_P7PAD[] = "VUCI04_pad";const char VO_P7TURN[] = "VUCI04_turn";const char VO_P8[] = "VLCI01_park";const char VO_P8PAD[] = "VLCI01_pad";const char VO_P8TURN[] = "VLCI01_turn";const char VO_P9[] = "VCOT01_park";const char VO_P9PAD[] = "VCOT01_pad";const char VO_P9TURN[] = "VCOT01_turn";const char VO_P10[] = "VFCI03_park";const char VO_P10PAD[] = "VFCI03_pad";const char VO_P10TURN[] = "VFCI03_turn";const char VO_P11[] = "VTTU01_park";const char VO_P11PAD[] = "VTTU01_pad";const char VO_P11TURN[] = "VTTU01_turn";const char VO_P12[] = "VLCI51_park";const char VO_P12PAD[] = "VLCI51_pad";const char VO_P12TURN[] = "VCLI51_turn";const char VO_P13[] = "VUCI44_park";const char VO_P13PAD[] = "VUCI44_pad";const char VO_P13TURN[] = "VUCI44_turn";const char VO_P14[] = "VUCI22_park";const char VO_P14PAD[] = "VUCI22_pad";const char VO_P14TURN[] = "VUCI22_turn";const char VO_P15[] = "VE37_park";const char VO_P15PAD[] = "VE37_pad";const char VO_P15TURN[] = "VE37_turn";const char VO_P16[] = "ABSC33_park";const char VO_P16PAD[] = "ABSC33_pad";const char VO_P16TURN[] = "ABSC33_turn";const char VO_P17[] = "ABSC34_park";const char VO_P17PAD[] = "ABSC34_pad";const char VO_P17TURN[] = "ABSC34_turn";const char VO_P18[] = "VSAT51_park";const char VO_P18PAD[] = "VSAT51_pad";const char VO_P18TURN[] = "VSAT51_turn";const char VO_P19[] = "VCOT62_park";const char VO_P19PAD[] = "VCOT62_pad";const char VO_P19TURN[] = "VCOT62_turn";const char VO_P20[] = "VTPG53_park";const char VO_P20PAD[] = "VTPG53_pad";const char VO_P20TURN[] = "VTPG53_turn";const char VO_P21[] = "VTTU21_park";const char VO_P21PAD[] = "VTTU21_pad";const char VO_P21TURN[] = "VTTU21_turn";const char VO_P22[] = "VTTU51_park";const char VO_P22PAD[] = "VTTU51_pad";const char VO_P22TURN[] = "VTTU51_turn";const char VO_P23[] = "VLCI22_park";const char VO_P23PAD[] = "VLCI22_pad";const char VO_P23TURN[] = "VLCI22_turn";const char VO_P24[] = "VAME01_park";const char VO_P24PAD[] = "VAME01_pad";const char VO_P24TURN[] = "VAME01_turn";const char VO_P25[] = "VECI54_park";const char VO_P25PAD[] = "VECI54_pad";const char VO_P25TURN[] = "VECI54_turn";const char VO_P26[] = "UCA1_park";const char VO_P26PAD[] = "UCA1_pad";const char VO_P26TURN[] = "UCA1_turn";const char VO_P27[] = "VSAE01_park";const char VO_P27PAD[] = "VSAE01_pad";const char VO_P27TURN[] = "VSAE01_turn";const char VO_P28[] = "AA77_park";const char VO_P28PAD[] = "AA77_pad";const char VO_P28TURN[] = "AA77_turn";const char VO_P29[] = "CT4_park";const char VO_P29PAD[] = "CT4_pad";const char VO_P29TURN[] = "CT4_turn";const char VO_P30[] = "VCOC51_park";const char VO_P30PAD[] = "VCOC51_pad";const char VO_P30TURN[] = "VCOC51_turn";const char VO_P31[] = "VOPE16_park";const char VO_P31PAD[] = "VOPE16_pad";const char VO_P31TURN[] = "VOPE16_turn";const char VO_P32[] = "AC51_park";const char VO_P32PAD[] = "AC51_pad";const char VO_P32TURN[] = "AC51_turn";const char VO_P33[] = "VMER_park";const char VO_P33PAD[] = "VMER_pad";const char VO_P33TURN[] = "VMER_turn";const char SND_TOSTATION[] = "mod:Audio/FX/hospital.wav";const char HINT_NOTVALID[] = "Esta viatura nao pertence ao estacionamento!";const char HINT_NOSPACE[] = "No space at the fire station, vehicle returns to base!";const char HINT_BACK[] = "Viatura de regresso ao estacionamento.";const char HINT_NOSPACE_AMBULANCE[] = "No space at the fire station, vehicle starts a patrol!";const char HINT_TRANSPORTS[] = "Esta ambulancia esta a transportar uma vitima, ira para o hospital primeiro!";int DummyGroup = 78;object RSBToFireStation : CommandScript{ RSBToFireStation() { SetCursor("tofirestation"); SetIcon("tofirestation"); SetGroupID(DummyGroup); SetGroupLeader(true); SetRestrictions(RESTRICT_SELFEXECUTE); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; Vehicle v(Caller); if (v.HasCommand(DUMMY_ISTRAILED) && !v.HasCommand(CMD_GETTILLER)) || v.HasCommand(DUMMY_HOSESON) || v.IsInstalled()) return false; if (!v.HasCommand("MoveTo")) return false; if (v.HasCommand(CMD_FLOODLIGHTS_OFF)) return false; return true; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if (!Caller->IsValid() || !Target->IsValid() || (Caller->GetID() != Target->GetID())) return false; return true; } void PushActions(GameObject *Caller, Actor *Target, int ChildID) { Vector Pos = Caller->GetPosition(); Vehicle v(Caller); if (v.GetVehicleType() == VT_AMBULANCE_RTW && v.GetNumTransported() > 0) { v.PushActionExecuteCommand(ACTION_NEWLIST, CMD_TOHOSPITAL, Caller, 0, false); Mission::PlayHint(HINT_TRANSPORTS); return; } if (v.IsBlueLightEnabled()) Game::ExecuteCommand(CMD_FLASHINGLIGHTS, &v, &v); if (v.HasCommand(DUMMY_TILLERGOHOME)) v.RemoveCommand(DUMMY_TILLERGOHOME); if (v.HasCommand(CMD_STANDBY_OFF)) { v.RemoveCommand(CMD_STANDBY_OFF); v.AssignCommand(CMD_STANDBY_ON); } if (v.HasCommand(DUMMY_WARNINGLIGHTS)) { v.EnableBlinker(BLT_NONE); v.RemoveCommand(DUMMY_WARNINGLIGHTS); v.AssignCommand(CMD_WARNINGLIGHTS); } if (v.HasCommand(CMD_FLOODLIGHTS_OFF)) { v.EnableSpecialLights(false); v.RemoveCommand(CMD_FLOODLIGHTS_OFF); v.AssignCommand(CMD_FLOODLIGHTS_ON); } if (v.HasObjectPath(NULL)) Game::ExecuteCommand(DUMMY_PATROL, &v, &v); if (v.HasCommand(DUMMY_HASSIREN) && v.HasCommand(CMD_AUTOSIREN_OFF)) Game::ExecuteCommand(DUMMY_DISABLE, &v, &v); if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL01) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P1, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P1PAD); ActorList l2 = Game::GetActors(VO_P1TURN); ActorList l3 = Game::GetActors(VO_P1); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL02) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P2, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P2PAD); ActorList l2 = Game::GetActors(VO_P2TURN); ActorList l3 = Game::GetActors(VO_P2); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL03) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P3, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P3PAD); ActorList l2 = Game::GetActors(VO_P3TURN); ActorList l3 = Game::GetActors(VO_P3); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL04) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P4, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P4PAD); ActorList l2 = Game::GetActors(VO_P4TURN); ActorList l3 = Game::GetActors(VO_P4); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL05) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P5, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P5PAD); ActorList l2 = Game::GetActors(VO_P5TURN); ActorList l3 = Game::GetActors(VO_P5); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL06) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P6, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P6PAD); ActorList l2 = Game::GetActors(VO_P6TURN); ActorList l3 = Game::GetActors(VO_P6); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL07) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P7, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P7PAD); ActorList l2 = Game::GetActors(VO_P7TURN); ActorList l3 = Game::GetActors(VO_P7); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL08) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P8, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P8PAD); ActorList l2 = Game::GetActors(VO_P8TURN); ActorList l3 = Game::GetActors(VO_P8); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL09) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P9, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P9PAD); ActorList l2 = Game::GetActors(VO_P9TURN); ActorList l3 = Game::GetActors(VO_P9); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL10) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P10, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P10PAD); ActorList l2 = Game::GetActors(VO_P10TURN); ActorList l3 = Game::GetActors(VO_P10); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL11) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P11, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P11PAD); ActorList l2 = Game::GetActors(VO_P11TURN); ActorList l3 = Game::GetActors(VO_P11); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL12) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P12, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P12PAD); ActorList l2 = Game::GetActors(VO_P12TURN); ActorList l3 = Game::GetActors(VO_P12); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL13) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P13, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P13PAD); ActorList l2 = Game::GetActors(VO_P13TURN); ActorList l3 = Game::GetActors(VO_P13); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL14) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P14, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P14PAD); ActorList l2 = Game::GetActors(VO_P14TURN); ActorList l3 = Game::GetActors(VO_P14); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL15) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P15, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P15PAD); ActorList l2 = Game::GetActors(VO_P15TURN); ActorList l3 = Game::GetActors(VO_P15); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL16) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P16, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P16PAD); ActorList l2 = Game::GetActors(VO_P16TURN); ActorList l3 = Game::GetActors(VO_P16); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL17) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P17, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P17PAD); ActorList l2 = Game::GetActors(VO_P17TURN); ActorList l3 = Game::GetActors(VO_P17); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL18) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P18, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P18PAD); ActorList l2 = Game::GetActors(VO_P18TURN); ActorList l3 = Game::GetActors(VO_P18); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL19) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P19, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P19PAD); ActorList l2 = Game::GetActors(VO_P19TURN); ActorList l3 = Game::GetActors(VO_P19); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL20) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P20, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P20PAD); ActorList l2 = Game::GetActors(VO_P20TURN); ActorList l3 = Game::GetActors(VO_P20); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL21) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P21, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P21PAD); ActorList l2 = Game::GetActors(VO_P21TURN); ActorList l3 = Game::GetActors(VO_P21); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL22) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P22, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P22PAD); ActorList l2 = Game::GetActors(VO_P22TURN); ActorList l3 = Game::GetActors(VO_P22); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL23) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P23, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P23PAD); ActorList l2 = Game::GetActors(VO_P23TURN); ActorList l3 = Game::GetActors(VO_P23); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL24) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P24, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P24PAD); ActorList l2 = Game::GetActors(VO_P24TURN); ActorList l3 = Game::GetActors(VO_P24); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL25) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P25, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P25PAD); ActorList l2 = Game::GetActors(VO_P25TURN); ActorList l3 = Game::GetActors(VO_P25); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL26) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P26, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P26PAD); ActorList l2 = Game::GetActors(VO_P26TURN); ActorList l3 = Game::GetActors(VO_P26); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL27) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P27, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P27PAD); ActorList l2 = Game::GetActors(VO_P27TURN); ActorList l3 = Game::GetActors(VO_P27); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL28) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P28, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P28PAD); ActorList l2 = Game::GetActors(VO_P28TURN); ActorList l3 = Game::GetActors(VO_P28); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL29) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P29, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P29PAD); ActorList l2 = Game::GetActors(VO_P29TURN); ActorList l3 = Game::GetActors(VO_P29); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL30) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P30, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P30PAD); ActorList l2 = Game::GetActors(VO_P30TURN); ActorList l3 = Game::GetActors(VO_P30); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL31) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P31, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P31PAD); ActorList l2 = Game::GetActors(VO_P31TURN); ActorList l3 = Game::GetActors(VO_P311); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL32) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P32, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P32PAD); ActorList l2 = Game::GetActors(VO_P32TURN); ActorList l3 = Game::GetActors(VO_P32); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_PATROL33) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_P33, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_P33PAD); ActorList l2 = Game::GetActors(VO_P33TURN); ActorList l3 = Game::GetActors(VO_P33); } } } else if(StrCompare(v.GetPrototypeFileName(), OBJ_CRANE) == 0) { GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_C2, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { { ActorList l1 = Game::GetActors(VO_C2PAD); ActorList l2 = Game::GetActors(VO_C2TURN); ActorList l3 = Game::GetActors(VO_C2); } } } else { Mission::PlayHint(HINT_NOTVALID); return; } if(l1.GetNumActors() > 0) Vector Pad = l1.GetActor(0)->GetPosition(); if(l2.GetNumActors() > 0) Vector TurnTo = l2.GetActor(0)->GetPosition(); if(l3.GetNumActors() > 0) Vector Park = l3.GetActor(0)->GetPosition(); Audio::PlaySample3D(SND_TOSTATION, Caller->GetPosition()); v.PushActionMove(ACTION_NEWLIST, Pad); v.PushActionTurnTo(ACTION_APPEND, TurnTo); v.PushActionWait(ACTION_APPEND, 1.0f); v.PushActionWait(ACTION_APPEND, 1.0f); v.PushActionMove(ACTION_APPEND, Park); v.PushActionTurnTo(ACTION_APPEND, TurnTo); v.PushActionWait(ACTION_APPEND, 1.0f); Game::ExecuteCommand(FREEFORALERT_TRUE, &v, &v); v.PushActionExecuteCommand(ACTION_APPEND, INBASE_TRUE, &v, 1, true); v.PushActionExecuteCommand(ACTION_APPEND, COMMANDABLE_FALSE, &v, 1, true); v.PushActionExecuteCommand(ACTION_APPEND, DUMMYGOHOME_P, &v, 1, true); v.PushActionExecuteCommand(ACTION_APPEND, "CloseGate", Caller, 1, true); v.PushActionExecuteCommand(ACTION_APPEND, "VcmdHeadlightsOn", &v, 1, true); Mission::PlayHint(HINT_BACK); if (v.HasCommand(DUMMY_WARNINGLIGHTS)) { v.EnableBlinker(BLT_NONE); v.RemoveCommand(DUMMY_WARNINGLIGHTS); v.AssignCommand(CMD_WARNINGLIGHTS); } else v.EnableBlinker(BLT_NONE); }};object DummyEngine : CommandScript{ DummyEngine() { SetGroupID(DummyGroup); } bool CheckTarget(GameObject *Caller, Actor *Target, int ChildID) { } void PushActions(GameObject *Caller, Actor *Target, int ChildID) { }};object DUMMYFPGoHomePersonal2 : CommandScript{ DUMMYFPGoHomePersonal2() { SetGroupID(DummyGroup); } bool CheckPossible(GameObject *Caller) { return true; } bool CheckTarget(GameObject *Caller, Actor *Target, int ChildID) { return true; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Vehicle v(Caller); PersonList pl = v.GetPassengers(); for(int i=0; i < pl.GetNumPersons(); i++) { Person p = pl.GetPerson(i); v.RemovePassenger(&p); p.PushActionDeleteOwner(ACTION_NEWLIST); } }};Thanks for reading. Quote Link to comment Share on other sites More sharing options...
Ghost Graphic Designs Posted February 24, 2015 Author Report Share Posted February 24, 2015 Update: tried to use the old script, removed the fire station gates but the problem is still there. I tested the fire station on the other side of the map and basically 9 ou of 10 Lisbonenses FD units park correctly in the their spots, but none of the 5 RSB units... Quote Link to comment Share on other sites More sharing options...
Terrow Posted February 24, 2015 Report Share Posted February 24, 2015 Are the VOs large enough? Quote Link to comment Share on other sites More sharing options...
Ghost Graphic Designs Posted February 24, 2015 Author Report Share Posted February 24, 2015 Are the VOs large enough?Yep. They're slightly larger than the vehicles. Quote Link to comment Share on other sites More sharing options...
Ghost Graphic Designs Posted February 26, 2015 Author Report Share Posted February 26, 2015 Ok, I got it solved. Instead of sitting and waiting for more suggestions or helping hands in here, I decided not to quit and did every single thing that crossed my mind. Guess that it turned out to be the VO sizes, the smaller, the better... Oh, and no more "No space at fire station!" messages. This useless topic can be locked by an admin, if you want. Cheers. Quote Link to comment Share on other sites More sharing options...