TheManGoesWild
Members-
Posts
13 -
Joined
-
Last visited
Recent Profile Visitors
1,665 profile views
TheManGoesWild's Achievements
-
Is there a scripting way that can activate lights that object(s) on a map have, example I have made flashing bollards infront of my stations, and currently you have to select them like a vehicle and use the flashing lights script (and only selectable for the host on MP). But is there a way that I can have a person in game click a button (similar to the Mayberry mod gate buttons) to activate the lights, eg I name the objects "station_bollards" and then all objects named that will activate on/off when pressed. Or preferably, if a trigger polygon could be used to turn them on/off when a vehicle is detected like the gates. I saw some scripts have something that seems related, but I'm unsure how to script it; { GameObject *obj = l1.GetObject(i); if (!obj->IsSpecialLightEnabled()) { obj->EnableSpecialLights(true); } } http://www.emergency-planet.com/uploads/monthly_2020_10/1320622087_Emergency4Screenshot2020_10.09-16_53_00_74.thumb.png.f33bd15370ba5b3c9056aac75c411cc8.png
-
Police cars donĀ“t stop at red light
TheManGoesWild replied to Airikir's topic in Modding Related Support
Would anyone know how I could use this in the ToFireStation script so vehicles return like real life stopping at lights etc? instead of driving straight through red lights -
Is there a way to change the water supply script to have individual vehicles have different tank sizes, eg engine 1 has 2000 gallons, engine 2 has 3000 gallons?, I know you can change the tankers and DLKs, but I mean for GTFs, I would like to be able to change the tank size per prototype, is this possible?
-
Hello, Does anyone have a script that activates each traffic light individually for use on vehicles (eg scene lights, traffic adviser lights), I would of edited the "ilight/interior light script" but I only have the encrypted version I mean being able to activate Traffic Lt. Red etc It would only be for my personal mod, not distributed.
-
Is there anyway to play a supervisor video in a script? like I have a test call for fire station script which plays tone test, I was wondering if its possible to add play super video video to the script? Below is my script that I've edited object TestAlarm : CommandScript { TestAlarm () { SetIcon("tones"); SetCursor("tones"); SetRestrictions(RESTRICT_SELFEXECUTE); SetPossibleCallers(ACTOR_VEHICLE); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; if (!Caller->GetType() == ACTOR_VEHICLE) return false; return true; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if (!Target->IsValid() || Target->GetID() != Caller->GetID()) return false; return true; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Vehicle v(Caller); if (!v.HasCommand(DUMMY_HASSIREN)) { if (!v.IsBlueLightEnabled()) { v.EnableBlueLights(true); } Vector Pos = Caller->GetPosition(); Audio::PlaySample3D("mod:Audio/FX/tones/Test.wav", Pos); } if (v.HasCommand(DUMMY_HASSIREN)) { if (childID == 1) { v.EnableBlueLights(false); } int ref = v.GetUserData(); v.UnattachSound(ref); Audio::StopSample(ref); int mSirTest; GameObjectList list = Game::GetGameObjects(NAME_DUMMYOBJECT); for(int i=0; i<list.GetNumObjects(); i++) { GameObject *obj = list.GetObject(i); if (obj->GetUserData() == ref) { mSirTest = i; } } GameObject *obj = list.GetObject(mSirTest); obj->PushActionDeleteOwner(ACTION_NEWLIST); if (v.HasCommand(DUMMY_HASSIREN)) v.RemoveCommand(DUMMY_HASSIREN); return; } } };
-
Simple play sound script?
TheManGoesWild replied to TheManGoesWild's topic in Modding Related Support
Thanks guys for your help, I got it -
Hello, Could anyone help me with a simple script that just plays a sound file when pressed? want to use it to play an alarm tone at one of the fire stations when I press it
-
Hello, I am having major issues with my LASiren script in my custom mod (Metropolitan Fire Brigade), after 20-25mins of gameplay the sirens get stuck on and/or do not play audio. I also get script Line 405 error for illegal pointer object, among other random errors when I go to turn the stuck on sirens off, it also causes crash to desktop when playing multiplayer when the sirens freeze. Here is the script code I am using, can anyone spot any problems/errors? //******************************************************************************************// #Version 2.7# // // Includes: All Sirens Commands // // - VcmdSiren // - DummyUpdatePos // - DummyDisableSiren // - DummyFindPath // - DummyHasSiren // // Script by Bass-Ti // Modified by Hoppah // //******************************************************************************************const char CMD_AUTOSIREN_OFF[] = "VcmdAutoSirenOff";const char EACTION_FINDPATH[] = "EActionFindPath";const char EACTION_EXTINGUISH[] = "EActionExtinguish";const char DUMMY_HASSIREN[] = "DummyHasSiren";const char DUMMY_UPDATEPOS[] = "DummyUpdatePos";const char DUMMY_FINDPATH[] = "DummyFindPath";const char DUMMY_HOSESON[] = "DummyHosesAreOn";const char NAME_DUMMYOBJECT[] = "HelpingObjekt_Hoppah";const char DUMMY_GETTIL[] = "DummyGetTiller";const char PROTO_ALS1[] = "mod:Prototypes/Vehicles/01Ambulance/als1.e4p";const char PROTO_MEDIC1[] = "mod:Prototypes/Vehicles/01Ambulance/medic1.e4p";const char PROTO_AMBULANCE1[] = "mod:Prototypes/Vehicles/01Ambulance/ambulance1.e4p";const char PROTO_AMBULANCE2[] = "mod:Prototypes/Vehicles/01Ambulance/ambulance2.e4p";const char PROTO_AMBULANCE3[] = "mod:Prototypes/Vehicles/01Ambulance/ambulance3.e4p";const char PROTO_AMR675[] = "mod:Prototypes/Vehicles/01Ambulance/amr675.e4p";const char PROTO_AMR676[] = "mod:Prototypes/Vehicles/01Ambulance/amr676.e4p";const char PROTO_CHIEF1[] = "mod:Prototypes/Vehicles/02Fire/chief1.e4p";const char PROTO_C2[] = "mod:Prototypes/Vehicles/02Fire/chief2.e4p";const char PROTO_C3[] = "mod:Prototypes/Vehicles/02Fire/chief3.e4p";const char PROTO_CAR2[] = "mod:Prototypes/Vehicles/02Fire/car2.e4p";const char PROTO_ENGINE1[] = "mod:Prototypes/Vehicles/02Fire/engine1.e4p";const char PROTO_ENGINE2[] = "mod:Prototypes/Vehicles/02Fire/engine2.e4p";const char PROTO_ENGINE3[] = "mod:Prototypes/Vehicles/02Fire/engine3.e4p";const char PROTO_ENGINE31[] = "mod:Prototypes/Vehicles/02Fire/engine31.e4p";const char PROTO_ENGINE4[] = "mod:Prototypes/Vehicles/02Fire/engine4.e4p";const char PROTO_RESCUE1[] = "mod:Prototypes/Vehicles/02Fire/rescue1.e4p";const char PROTO_RESCUE2[] = "mod:Prototypes/Vehicles/02Fire/rescue2.e4p";const char PROTO_FORESTRY1[] = "mod:Prototypes/Vehicles/02Fire/forestry1.e4p";const char PROTO_TANKER3[] = "mod:Prototypes/Vehicles/02Fire/tanker3.e4p";const char PROTO_UTILITY1[] = "mod:Prototypes/Vehicles/02Fire/utility1.e4p";const char PROTO_ENGINE10[] = "mod:Prototypes/Vehicles/02Fire/engine10.e4p";const char PROTO_ENGINE8[] = "mod:Prototypes/Vehicles/02Fire/engine8.e4p";const char PROTO_SQUAD10[] = "mod:Prototypes/Vehicles/02Fire/squad10.e4p";const char PROTO_SQUAD11[] = "mod:Prototypes/Vehicles/02Fire/squad11.e4p";const char PROTO_SQUAD13[] = "mod:Prototypes/Vehicles/02Fire/squad13.e4p";const char PROTO_SQUAD14[] = "mod:Prototypes/Vehicles/02Fire/squad14.e4p";const char PROTO_TANKER21[] = "mod:Prototypes/Vehicles/02Fire/tanker21.e4p";const char PROTO_TANKER1[] = "mod:Prototypes/Vehicles/02Fire/tanker1.e4p";const char PROTO_USFSBRUSH[] = "mod:Prototypes/Vehicles/02Fire/USFSBRUSH.e4p";const char PROTO_LADDER10[] = "mod:Prototypes/Vehicles/02Fire/ladder10.e4p";const char PROTO_LADDER1[] = "mod:Prototypes/Vehicles/02Fire/ladder1.e4p";const char PROTO_HAZMAT8[] = "mod:Prototypes/Vehicles/02Fire/hazmat8.e4p";const char PROTO_BA38[] = "mod:Prototypes/Vehicles/02Fire/BA38.e4p";const char PROTO_utility2[] = "mod:Prototypes/Vehicles/02Fire/utility2.e4p";const char PROTO_POV1[] = "mod:Prototypes/Vehicles/02Fire/pov1.e4p";const char PROTO_POV2[] = "mod:Prototypes/Vehicles/02Fire/pov2.e4p";const char PROTO_POV3[] = "mod:Prototypes/Vehicles/02Fire/pov3.e4p";const char PROTO_POV4[] = "mod:Prototypes/Vehicles/02Fire/pumper38b.e4p";const char PROTO_PUMPER45[] = "mod:Prototypes/Vehicles/02Fire/pumper45.e4p";const char PROTO_DLK[] = "mod:Prototypes/Vehicles/02Fire/DLK.e4p";const char PROTO_transporterempty[] = "mod:Prototypes/Vehicles/02Brandweer/transporterempty.e4p";const char PROTO_transportersat[] = "mod:Prototypes/Vehicles/02Brandweer/transportersat.e4p";const char PROTO_transporterheavy[] = "mod:Prototypes/Vehicles/02Brandweer/transporterheavy.e4p";const char PROTO_transporterfire[] = "mod:Prototypes/Vehicles/02Brandweer/transporterfire.e4p";const char PROTO_mfbbus[] = "mod:Prototypes/Vehicles/02Fire/mfbbus.e4p";const char PROTO_SHERIFFSUP[] = "mod:Prototypes/Vehicles/03Police/sheriffsup.e4p";const char PROTO_SHERIFF001[] = "mod:Prototypes/Vehicles/03Police/sheriff001.e4p";const char PROTO_SHERIFF002[] = "mod:Prototypes/Vehicles/03Police/sheriff002.e4p";const char PROTO_SHERIFF003[] = "mod:Prototypes/Vehicles/03Police/sheriff003.e4p";const char PROTO_SHERIFF004[] = "mod:Prototypes/Vehicles/03Police/sheriff004.e4p";const char PROTO_BOMBSQUAD[] = "mod:Prototypes/Vehicles/03Police/bombsquad.e4p";const char PROTO_SWATTRUCK[] = "mod:Prototypes/Vehicles/03Police/swattruck.e4p";const char PROTO_CAMPUS_SAFETY[] = "mod:Prototypes/Vehicles/03Police/campus_safety.e4p";const char PROTO_SQUAD4[] = "mod:Prototypes/Vehicles/02Fire/squad4.e4p";const char PROTO_SHERIFFK9[] = "mod:Prototypes/Vehicles/03Police/sheriffk9.e4p";const char PROTO_COUNTYMCI[] = "mod:Prototypes/Vehicles/01Ambulance/countymci.e4p";const char PROTO_TRAFFICUNIT[] = "mod:Prototypes/Vehicles/03Police/trafficunit.e4p";const char PROTO_SWATUNIT[] = "mod:Prototypes/Vehicles/03Police/swatunit.e4p";const char PROTO_PRV1[] = "mod:Prototypes/Vehicles/03 LA Police/suv_lapd.e4p";const char PROTO_PRV2[] = "mod:Prototypes/Vehicles/02Fire/pov5.e4p";const char PROTO_PRV3[] = "mod:Prototypes/Vehicles/01 Welfordshire FRS/01 Rambleside 14Z1.e4p";const char PROTO_FOV1[] = "mod:Prototypes/Vehicles/Sprinter Transporter/Sprinter.e4p";int DummyGroup = 63;object VcmdSiren : CommandScript{ VcmdSiren() { SetIcon("sirenson"); SetCursor("sirens"); SetRestrictions(RESTRICT_SELFEXECUTE); SetPossibleCallers(ACTOR_VEHICLE); SetGroupID(DummyGroup); SetGroupLeader(true); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; if (Caller->HasCommand(DUMMY_HASSIREN)) SetIcon("sirensoff"); else SetIcon("sirenson"); if(Caller->HasCommand(DUMMY_HOSESON)) return false; return true; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if (!Target->IsValid() || Target->GetID() != Caller->GetID()) return false; return true; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Vehicle v(Caller); if (!v.HasCommand(DUMMY_HASSIREN)) { if (!v.IsBlueLightEnabled()) { v.EnableBlueLights(true); } int soundID; Vector CarPos = v.GetPosition(); if (StrCompare(v.GetPrototypeFileName(), PROTO_TANKER21) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_transporterempty) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_transporterheavy) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_transporterfire) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_transportersat) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/LTSmix.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/LTSmix.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_SHERIFF001) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_SHERIFF002) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_SHERIFF003) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_SHERIFF004) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_SWATUNIT) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/mcso.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/mcso.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_SHERIFFK9) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_CAMPUS_SAFETY) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_BOMBSQUAD) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_SHERIFFSUP) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/whelen.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/whelen.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_SQUAD10) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/PTLTSMix.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/PTLTSMix.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_MEDIC1) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_COUNTYMCI) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/ambulance3.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/ambulance3.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_AMBULANCE2) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_AMBULANCE1) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_AMR675) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_AMR676) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_AMBULANCE3) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_ALS1) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/AmboSiren.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/AmboSiren.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_RESCUE1) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_C2) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_C3) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_PUMPER45) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/LTSmix1B.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/LTSmix1B2.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_DLK) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/LTSwail.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/LTSwail.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE8) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Bendigo.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Bendigo2.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_SQUAD14) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Hazardwail.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Hazardwail.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE4) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_USFSBRUSH) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_FOV1) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_SQUAD11) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/HMix.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/HMix.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_TRAFFICUNIT) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_POV3) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_POV2) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_HAZMAT8) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/HMix2.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/HMix2.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE1) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_SQUAD13) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_SQUAD4) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Hazardyelp.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Hazardyelp.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE3) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_TANKER3) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_POV4) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE31) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_FORESTRY1) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/LTSgreyMix.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/LTSgreyMix.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_TANKER1) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_PRV1) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_POV1) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_CAR2) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/LTSyelp.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/LTSyelp.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_BA38) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_utility2) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_mfbbus) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE2) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_RESCUE2) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_LADDER1) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_CHIEF1) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Hazardmix.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Hazardmix.wav", CarPos, true); } } else if (StrCompare(v.GetPrototypeFileName(), PROTO_PRV2) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE10) == 0 || StrCompare(v.GetPrototypeFileName(), PROTO_LADDER10) == 0) { int random = Math::rand()%2; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/CarsonMix.wav", CarPos, true); } else { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/CarsonMix.wav", CarPos, true); } } int CarID = v.GetID(); GameObject mDummy = Game::CreateObject("mod:Prototypes/Objects/Misc/empty.e4p", NAME_DUMMYOBJECT); v.AssignCommand(DUMMY_HASSIREN); v.SetUserData(soundID); mDummy.Hide(); //mDummy.SetUserData(v.GetID()); mDummy.SetUserData(soundID); mDummy.AttachSound(soundID); mDummy.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_UPDATEPOS, &v, 0, false); return; } if (v.HasCommand(DUMMY_HASSIREN)) { System::Log("Stop sample via VcmdSiren"); if (childID == 1) { v.EnableBlueLights(false); } int CarID = v.GetUserData(); int ref = v.GetUserData(); v.UnattachSound(ref); Audio::StopSample(ref); int mSirTest; GameObjectList list = Game::GetGameObjects(NAME_DUMMYOBJECT); for(int i=0; i<list.GetNumObjects(); i++) { GameObject *obj = list.GetObject(i); if (obj->GetUserData() == CarID) { mSirTest = i; } } GameObject *obj = list.GetObject(mSirTest); obj->PushActionDeleteOwner(ACTION_NEWLIST); if (v.HasCommand(DUMMY_HASSIREN)) v.RemoveCommand(DUMMY_HASSIREN); return; } }};object DummyUpdatePos : CommandScript{ DummyUpdatePos() { SetGroupID(DummyGroup); } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { } void PushActions(GameObject *Caller, Actor *Target, int childID) { Vehicle v(Target); GameObject mDummy(Caller); if (v.IsDestroyed() || !v.IsValid()) { int ref = mDummy.GetUserData(); mDummy.UnattachSound(ref); Audio::StopSample(ref); if (v.HasCommand(DUMMY_HASSIREN)) v.RemoveCommand(DUMMY_HASSIREN); mDummy.PushActionDeleteOwner(ACTION_NEWLIST); } else { if (v.IsCurrentAction(EACTION_FINDPATH)) { if (!v.HasCommand(DUMMY_FINDPATH)) { v.AssignCommand(DUMMY_FINDPATH); } } Vector vPos = v.GetPosition(); mDummy.SetPosition(vPos); mDummy.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_UPDATEPOS, Target, childID, false); } if (v.HasCommand(DUMMY_FINDPATH)) { if (!v.IsCurrentAction(EACTION_FINDPATH) && v.HasCommand(CMD_AUTOSIREN_OFF) && (v.GetNumActions() == 0 || v.IsCurrentAction(EACTION_EXTINGUISH))) { if (v.HasCommand(DUMMY_HASSIREN)) v.RemoveCommand(DUMMY_HASSIREN); if (v.HasCommand(DUMMY_FINDPATH)) v.RemoveCommand(DUMMY_FINDPATH); int CarID = v.GetUserData(); int ref = v.GetUserData(); v.UnattachSound(ref); Audio::StopSample(ref); GameObjectList list = Game::GetGameObjects(NAME_DUMMYOBJECT); for(int i = 0; i < list.GetNumObjects(); i++) { int mSirTest; GameObject *obj = list.GetObject(i); if (obj->GetUserData() == CarID) { mSirTest = i; GameObject *obj = list.GetObject(mSirTest); obj->PushActionDeleteOwner(ACTION_NEWLIST); if (v.HasCommand(DUMMY_HASSIREN)) v.RemoveCommand(DUMMY_HASSIREN); if (v.HasCommand(DUMMY_FINDPATH)) v.RemoveCommand(DUMMY_FINDPATH); } } } } }};object DummyDisableSiren : CommandScript{ DummyDisableSiren() { SetGroupID(DummyGroup); } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { } void PushActions(GameObject *Caller, Actor *Target, int childID) { Vehicle v(Caller); if (childID == 1) { v.EnableBlueLights(false); } //int CarID = v.GetID(); int CarID = v.GetUserData(); int ref = v.GetUserData(); v.UnattachSound(ref); Audio::StopSample(ref); GameObjectList list = Game::GetGameObjects(NAME_DUMMYOBJECT); for(int i = 0; i < list.GetNumObjects(); i++) { GameObject *obj = list.GetObject(i); if (obj->GetUserData() == CarID) { int mSirTest = i; GameObject *obj = list.GetObject(mSirTest); obj->PushActionDeleteOwner(ACTION_NEWLIST); if (v.HasCommand(DUMMY_HASSIREN)) v.RemoveCommand(DUMMY_HASSIREN); if (v.HasCommand(DUMMY_FINDPATH)) v.RemoveCommand(DUMMY_FINDPATH); if (v.HasCommand(DUMMY_GETTIL)) v.SetUserData(v.GetID()); } } }};object DummyFindPath : CommandScript{ DummyFindPath() { SetGroupID(DummyGroup); } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { return false; } void PushActions(GameObject *Caller, Actor *Target, int childID) { }};object DummyHasSiren : CommandScript{ DummyHasSiren() { SetGroupID(DummyGroup); } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { return false; } void PushActions(GameObject *Caller, Actor *Target, int childID) { }};Thanks in advance, Brendan.
-
Could you tell me how you did it? Where do we change the location of the Supervisor? which specs files need to be edited.
-
Regarding the Global Event Frequency Setting in the Freeplay.xml files, Is the higher the number the more events at once, or lower the number the more events at once? My current setting is "<GlobalEventFrequencyFactor value="0.5"/>", but I seem to get 2-3 events at a time once I start dealing with the first one.
-
Can anyone tell how many real seconds equals 1 ingame minute?, I think its 3 real-life seconds equals 1 in-game minute?
-
Australian Mod -Semi Fictional
TheManGoesWild replied to Lisa Rose's topic in Mod Development and Concepts
You have done a great job, keep up the good work! from a fellow Aussie