mariuswww Posted February 4, 2014 Report Share Posted February 4, 2014 Is it possible to make for example "Red Lights" category (or any other) to flash while the unit moves and stop flashing when the unit stop? Here is the move script I want to edit. (From LA Mod edited by Manhattan Mod) const char DUMMY_NEED_EX[] = "DummyChange"; object MoveTo : CommandScript{MoveResult mr;bool TankCanMove;MoveTo(){SetValidTargets(ACTOR_FLOOR | ACTOR_OBJECT | ACTOR_VIRTUAL | ACTOR_HOUSE | ACTOR_OPEN_HOUSE);SetHighlightingEnabled(false);SetDeselectCaller(false);//SetActivationByLeftClick(true);} bool CheckPossible(GameObject *Caller){if (!Caller->IsValid() || Caller->HasCommand("DummySniper"))return false; if (Caller->GetType() == ACTOR_VEHICLE){ Vehicle v(Caller);if (v.GetNumPassengers() == 0)return false; if (v.HasCommand("EngineOns"))return false;if (StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/01 US Army Camo/abrams.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/01 US Army Camo/bradley.e4p") == 0){PersonList l1 = v.GetPassengers();TankCanMove = false;for(int i=0; i < l1.GetNumPersons(); i++){if (!TankCanMove && StrCompare(l1.GetPerson(i)->GetPrototypeFileName(), "mod:Prototypes/Persons/01 US Army/tank_crew.e4p") == 0)TankCanMove = true;}if (!TankCanMove)return false;}} return true;} bool CheckTarget(GameObject *Caller, Actor *Target, int childID){mr = Commands::CheckMoveConditions(Caller, Target, childID);if(mr.Mode == MOVE_ABORT)return false; if (Caller->GetType() == ACTOR_VEHICLE){ Vehicle v(Caller);if (v.GetNumPassengers() == 0 && StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/01 US Army Camo/us_army_supply_truck.e4p") != 0)return false;} return true;} void PushActions(GameObject *Caller, Actor *Target, int childID){if(mr.Mode == MOVE_ABORT)return; switch(mr.Mode){case MOVE_TO_POSITION: // directly to target{if(Caller->GetFirehoseID() > 0){Caller->PushActionMoveWithHose(ACTION_NEWLIST, mr.Target);return;}Caller->PushActionMove(ACTION_NEWLIST, mr.Target, true);break;} case MOVE_INTO_HOUSE: // into house, to target{Caller->PushActionMove(ACTION_NEWLIST, mr.Intermediate1, true);Caller->PushActionEnterHouse(ACTION_APPEND, &mr.EnterHouse);Caller->PushActionMove(ACTION_APPEND, mr.Target, true);break;} case MOVE_HOUSE_TO_HOUSE: // out of house, into other house, to target{Caller->PushActionMove(ACTION_NEWLIST, mr.Intermediate1, true);Caller->PushActionLeaveHouse(ACTION_APPEND, &mr.LeaveHouse);Caller->PushActionMove(ACTION_APPEND, mr.Intermediate2, true);Caller->PushActionEnterHouse(ACTION_APPEND, &mr.EnterHouse);Caller->PushActionMove(ACTION_APPEND, mr.Target, true);break;} case MOVE_HOUSE_TO_POSITION: // out of house{Caller->PushActionMove(ACTION_NEWLIST, mr.Intermediate1, true);Caller->PushActionLeaveHouse(ACTION_APPEND, &mr.LeaveHouse);Caller->PushActionMove(ACTION_APPEND, mr.Target, true);break;}} if (Caller->GetType() == ACTOR_VEHICLE){Vehicle v(Caller); //if (v.IsLightOn())//Caller->PushActionLightOn(ACTION_INSERT,false); if ((v.GetVehicleType() == VT_AMBULANCE_RTW || v.GetVehicleType() == VT_AMBULANCE_ITW) && !v.IsBlueLightEnabled() && v.GetNumTransported() > 0)v.EnableBlueLights(true); if (!v.HasCommand("DummyHasSiren") && v.HasCommand("VcmdSiren") && v.HasCommand("VcmdAutoSirenOff") && !Input::LShiftPressed() && !Input::RShiftPressed())Game::ExecuteCommand("VcmdSiren", &v, &v); else if (!v.HasCommand("DummyHasEngine") && !v.HasCommand("DummyHasSiren"))Game::ExecuteCommand("DummyEngine", &v, &v); else if(v.HasCommand("DUMMYNeedsHose"));v.SetChildEnabled("hose", true);v.RemoveCommand("DUMMYNeedsHose"); } else if (Caller->GetType() == ACTOR_PERSON){Person p(Caller);if(p.GetEquipment() == EQUIP_RIFLE && p.IsAiming() || p.IsCurrentAnimation("shootrifle")){p.PushActionAimEnd(ACTION_INSERT);} } // Special code for fgrr (Bergefahrzeug). Deinstalls itself automaticallyif (mr.UnInstall) {Vehicle v(Caller);if (v.GetVehicleType() == VT_THW_FGRR_BKF){//System::Print("FGRR: Mode 1 - DeInstall");Caller->PushActionDeinstall(ACTION_INSERT);}else if (v.GetVehicleType() == VT_FIREFIGHTERS_DLK){if (mr.BasketDown && mr.UnInstall){Caller->PushActionDeinstall(ACTION_INSERT);Caller->PushActionBasketDown(ACTION_INSERT, Vector(0.f, 0.f, 0.f));}else if (mr.BasketDown) Caller->PushActionBasketDown(ACTION_INSERT, Vector(0.f, 0.f, 0.f));else if (mr.UnInstall) Caller->PushActionDeinstall(ACTION_INSERT);}}}}; All inputs are appreciated. Quote Link to comment Share on other sites More sharing options...