Guest Dakati Posted October 24, 2009 Report Share Posted October 24, 2009 Hello.I've made a spawn script for my mod, but i have a problem.If i push the button, the vehicle appear, and the persons 2.The walk to the vehicle, turn to it, but they dont enter it.Also, if i select them, the command EnterCar is disabled.The script:const char SPAWN_01[] = "fs1_spawn1";const char SPAWN_02[] = "fs1_spawn2";const char PSPAWN_01[] = "fs1_spawnp1";// Prototypesconst char PT_AMBU[] = "mod:Prototypes/Vehicles/Ambulance/rtw.e4p";// Personenconst char PT_P_ARTS[] = "mod:Prototypes/Persons/Ambulance/doctor_m.e4p";const char PT_P_BRD[] = "mod:Prototypes/Persons/Ambulance/paramedic.e4p";const char UNNAMED[] = "Unnamed";object ScmdAmbu : CommandScript{ ScmdAmbu() { SetCursor("none"); SetIcon("none"); } bool CheckPossible(GameObject *Caller) { return true; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { return true; } void PushActions(GameObject *Caller, Actor *Target, int ChildID) { ActorList spawnvo = Game::GetActors(SPAWN_01); ActorList spawnp = Game::GetActors(PSPAWN_01); if(spawnvo.GetNumActors() > 0) Vector Spawn = spawnvo.GetActor(0)->GetPosition(); if(spawnp.GetNumActors() > 0) Vector SpawnPer = spawnp.GetActor(0)->GetPosition(); Vehicle v = Game::CreateVehicle(PT_AMBU, UNNAMED); if (Game::FindFreePosition(&v, Spawn)) { Game::FindFreePosition(&v, Spawn); v.SetPosition(Spawn); } Person arts = Game::CreatePerson(PT_P_ARTS, UNNAMED); Person para = Game::CreatePerson(PT_P_BRD, UNNAMED); if (Game::FindFreePosition(&arts, SpawnPer)) { arts.SetUpgradeLevel(3); Game::FindFreePosition(&arts, SpawnPer); arts.SetPosition(SpawnPer); arts.PushActionMove(ACTION_NEWLIST, &v, TARGET_PASSENGERDOOR); arts.PushActionTurnTo(ACTION_APPEND, &v); arts.PushActionEnterCar(ACTION_APPEND, &v); } if (Game::FindFreePosition(¶, SpawnPer)) { para.SetUpgradeLevel(3); Game::FindFreePosition(¶, SpawnPer); para.SetPosition(SpawnPer); para.PushActionMove(ACTION_NEWLIST, &v, TARGET_PASSENGERDOOR); para.PushActionTurnTo(ACTION_APPEND, &v); para.PushActionEnterCar(ACTION_APPEND, &v); } }};Any suggestions? Quote Link to comment Share on other sites More sharing options...