Jump to content

SirMoo

Members
  • Posts

    230
  • Joined

  • Last visited

Everything posted by SirMoo

  1. I can only see a fail if a mod pack is made add the governator is added... Mindless voice clips from all his movies. @_@ Oh dear god... If this becomes realistic... I'm going to start a picketing group! -shivers.-
  2. Can we please have no further talk regarding political matters in this particular thread... -- Police Supervisor is worthless, Governor is worthless... At this rate we're going to have to start adding things like a judge to issue search warrants, FBI Director, Mayor of LA... This could go on and on.. o.O (Ps: I just found the icon Hoppah uses on the swat article on Wikipedia... All the times I've read it... I never noticed it before. o.o Ooohlala. )
  3. Yes. Then why bring it up? Everything I said was related to this map. If you had read previously you'd see I've discussed this map before and everything I talked about was regarding this particular map. Please re-read before making yourself look any worst. This map posses a MAJOR issue with traffic jams which a few I've been able to work out and some I've not. Now then, unless you have something to say regarding this map (and the issues relating to it) and not trying to make me wrong when you're clearly the one who needs to check facts, then step along.
  4. This is not the place for un-founded childish remarks relating to something that has nothing to do with the game. Though I'm not a fan of the president, you should really learn to act more mature about the situation and not start to slur with religious based bias that are 1) un-founded and 2) in-accurate. Furthermore, Hoppah is right in terms of who is in charge of the national guard. It being under the direct control of the governor of the state or territory it is based in. It is not directly under the control of the president, though he can call upon them in certain states of emergency. They are a perfect example to the "right to bare arms" where it has been stated in the text AND by USSC cases that this right is offered to the Militia of the Governor of said state. If the the National Guard is needed for federal usage, the President then may request such of the governor and take control, etc, etc. So Hoppah... Do we get a governor? In a snazzy car? With a nice suite on and maybe a little flag pin on his lapel?
  5. Try reading this thread ( http://forum.emergency-planet.com/index.php?showtopic=7020 ). Furthermore you'll need to know how to make virtual objects in the editor. Doing things is very simple if you look how its done on one of the maps made by Hoppah ( or w00ds ) and then copy the general idea. Create new virtual objects and just modify it the LAFireStation and LAPoliceStation to spawn the vehicles. I mean... in theory it should be be that difficult if you simply copy, paste and modify the script that are already in place to spawn the basic vehicles.
  6. I still tend to like this one over Hoppah's new map so I've been having to tweak it a bit. Some of the issues I noticed in 1.8 don't seem to be there in 1.9. The major issue I've found is the fact that there are lots of traffic jams and this causes bus's to get off target and cause long sessions where traffic is not moving. I've fixed this for the most part in my version by removing a bus stop and adding a lot more stop lights. Other then that I've not found any major issues yet. I've yet to fix the pathing issue when you have a vehicle on patrol and it goes south and has no way to go north so crossed over the median. Anyone else notice any problems since 1.9?
  7. I tend to work from the point of view "if it aint broken... how can I make it even better?". I love constant changes to a game... However I do think this current map needs a great deal of work... More events and more people inside buildings... I love the MVA. The police car... secret service agent only leads to speculation as to what actually happened... Who were they following and why... But I do think we need more people trying to jump out of windows... more people injured in a building and better hostage situations. I also think some more vehicle paths need to be added for both patrols and basic traffic.
  8. You do realize that normally it would be either the US Marshal Service, Secret Service (Which was originally made to prevent counterfeit money as as a division of the United States Department of Treasury. Their duties were eventually given primary to the FBI...) or the lesser known U.S. Diplomatic Security Service. You're more likely to have Xe (Blackwater USA) protect a person than the FBI. But in most cases I'd assume that if an agent was protecting something is either Marshal Service or DSS. None-the-less... In w00ds second map (I think? Not the revised) I used the gated house to set up a military zone with guards at the gates, cameras every where and with the "VIP" and commander guy talking as well as a helipad for flights out to the military base. =D I love pointless ingame roleplay. For those who don't know... That song is the opening for "3rd Watch".
  9. SirMoo

    LAChase

    Haha, yeah. I noticed I did that too while playing it one day. I fixed it in my version but was more interested if anyone would catch the typo on here. -gives billyfromhill a cookie.- Yeah, I really don't think realistic prices will be of any benefit. I mean... We could set tiers like... "Speeding in a School Zone" or "Speeding in a Construction Zone" both of which carry pretty hefty fines (double) where I live.
  10. Your argument is null. Please contribute an actual debatable comment and not trash. The point I was trying to make is it's virtually a clone of other features (Barricades, Turn Back People etc.) Now based on what Xplorer4x4 on real life things... I most certainly understand the use. But Normally tape is used for crime scenes... Crime moves in this game... And unless you're going to let people die so it becomes a murder scene... o.O I don't see a point for yellow tape. Adding it around an injured person will just make it take more time. And normally I can have EMS and Fire out to the person before I could get a cop to put up the yellow tape. Please explain the real in game benefit.
  11. Because patches are to fix issues normally and since the game is already highly loaded a lot of new features are better off as sub-mods for those older/low-resource machines. More unmarked cars in not a necessary addition to the game outside of free-play. Whats wrong with it being a sub-mod?
  12. What would be the point? It seems just like something extra pretty that can already be done... just a different way. I never use barricades, cones or any of that crap... Just a car, officer or firetruck to block off an area. Would there be much use since you're not actually investigating anything?
  13. This did not seem to work. Am I suppose to assume a specific step that you did not mention? Other than just adding this code?
  14. So I traded out the firefighter for the EMS Captain in the Battalion Chief car... That part was easy, but he never equips his bag automatically. Here is what I have in the files. First I modified the child id for EMS Captain to have a bag... File Ref: LAFireStation.script PersonList passengers = v.GetPassengers(); if (ChildID == 1) { Person p = Game::CreatePerson(OBJ_PM, UNNAMED); p.SetEquipment(EQUIP_EMERGENCY_CASE); } else if (ChildID == 2) Person p = Game::CreatePerson(OBJ_PM_STRETCHER, UNNAMED); else if (ChildID == 3) Person p = Game::CreatePerson(OBJ_EMT, UNNAMED); else if (ChildID == 4) Person p = Game::CreatePerson(OBJ_CHIEF, UNNAMED); else if (ChildID == 5) Person p = Game::CreatePerson(OBJ_HAZMAT, UNNAMED); else if (ChildID == 6) Person p = Game::CreatePerson(OBJ_USARFF, UNNAMED); else if (ChildID == 7) Person p = Game::CreatePerson(OBJ_EMT_STRETCHER, UNNAMED); else if (ChildID == 8) { Person p = Game::CreatePerson(OBJ_EMS_CAPTAIN, UNNAMED); p.SetEquipment(EQUIP_EMERGENCY_CASE); } else This did what I want and gave him a bag, BUT the bag is unusable and I can set it down nor can I do any other actions except move around and get into the vehicle I thought I need to modify the EMS Cap when he's in the vehicle and I did not really know what I was doing but I added a tiny command not really understanding what it does. -shrugs.- File Ref: LAFireStationStart.script ActorList l6 = Game::GetActors(VO_BATTALION); for(int i=0; i < l6.GetNumActors(); i++) { Vector Battalion = l6.GetActor(0)->GetPosition(); Vehicle m = Game::CreateVehicle(OBJ_BATTALION, UNNAMED); m.EnableBlueLights(false); m.SetPosition(Battalion); m.UpdatePlacement(); m.SetMaxPassengers(2); m.SetSpeed(12.0f); m.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_CALLCREW, Caller, 4, false); m.PushActionWait(ACTION_APPEND, 0.5f); m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 8, false); m.PushActionWait(ACTION_APPEND, 0.5f); } So what exactly do I need to do to fix this problem?
  15. Mind re uploading your airhorn.wav file. To make sure I'm getting these steps right... add it to the vehicles in the editor and all is go? Does it need to be positioned at a certian location? :\ I'm not really sure at this point.
  16. I'll be willing to host mirrors of anything for the game if needed.
  17. Ha. Right. My bad. It says so in the script.
  18. Below is what I have in my LAHorn.script file. Which is the most recent one you posted. It plays it over and over as well as stays in the spot and not with the vehicle. object VcmdHorn : CommandScript { VcmdHorn() { SetIcon("sirenson"); SetCursor("sirens"); SetRestrictions(RESTRICT_SELFEXECUTE); SetPossibleCallers(ACTOR_VEHICLE); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) 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) { Audio::PlaySample3D("mod:Audio/FX/Sirens/airhorn.wav", Caller->GetPosition(), false); } };
  19. SirMoo

    LAChase

    Of course. I could not find a website that listed the real ticket prices for said violations... :/ But I'd like to add more so it's more realistic when playing.
  20. Look for VCMDChase in the editor. Not LAChase.
  21. Here is the LAChase.script, but remember to use it you have to be able to use the editor which, yes, does come with the game. //******************************************************************************** ********** // #Version 1.0# // // Includes: Chase commands for police vehicles // // - VcmdFollow // - DummyUpdateFollowPos // - DummyFollow // // Script by Hoppah // // Usage of this script in other mods is NOT allowed without permission of Hoppah // //******************************************************************************** ********** const char CMD_FOLLOW[] = "VcmdFollow"; const char CMD_SIREN[] = "VcmdSiren"; const char DUMMY_ARREST2[] = "DummyArrest2"; const char DUMMY_HASSIREN[] = "DummyHasSiren"; const char DUMMY_DISABLE[] = "DummyDisableSiren"; const char DUMMY_PATROL[] = "DummyPatrol"; const char NAME_DUMMYOBJECT[] = "DummyFollow"; const char NAME_BLOCK[] = "DummyBlock"; const char DUMMY_UPDATEPOS[] = "DummyUpdateFollowPos"; const char DUMMY_FOLLOW[] = "DummyFollow"; const char EACTION_FINDPATH[] = "EActionFindPath"; const char CMD_PUTINCAR[] = "PutInCar"; const char CMD_AUTOSIREN_OFF[] = "VcmdAutoSirenOff"; const char CMD_SHOOTGUN[] = "Shoot"; const char CMD_HOLSTERGUN[] = "HolsterWeapon"; const char CMD_DRAWGUN[] = "DrawWeapon"; const char CMD_ARREST[] = "Arrest"; const char CMD_ARREST2[] = "PcmdArrest2"; const char SND_DRAW[] = "mod:Audio/FX/Misc/DrawWeapon.wav"; const char SND_HOLSTER[] = "mod:Audio/FX/Misc/HolsterWeapon.wav"; const char SND_CARTHEFT1[] = "mod:Audio/FX/radio/pd_stolencar1.wav"; const char SND_CARTHEFT2[] = "mod:Audio/FX/radio/pd_stolencar1.wav"; const char SND_ESCAPECAR[] = "mod:Audio/FX/radio/pd_escapecar.wav"; const char SND_PERSON[] = "mod:Audio/FX/radio/pd_person.wav"; const char SND_AMOK[] = "mod:Audio/FX/radio/pd_amokdriver.wav"; int DummyGroup = 29; object VcmdFollow : CommandScript { VcmdFollow() { SetIcon("follow"); SetCursor("follow"); SetGroupID(DummyGroup); SetGroupLeader(true); SetRestrictions(RESTRICT_NOTDESTROYED | RESTRICT_NOTINJURED); SetValidTargets(ACTOR_VEHICLE | ACTOR_PERSON); SetPriority(10); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid() || !Caller->HasCommand(CMD_SIREN)) return false; if (Caller->GetType()==ACTOR_VEHICLE) { Vehicle v(Caller); if(v.GetVehicleType() != VT_POLICE_STW && v.GetVehicleType() != VT_POLICE_MTW && v.GetVehicleType() != VT_POLICE_SW) return false; if(v.GetNumPassengers() == 0) return false; } return true; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if (!Caller->IsValid() || !Target->IsValid() || (Target->GetID() == Caller->GetID())) return false; if (Caller->GetType()==ACTOR_VEHICLE) { Vehicle v(Caller); if(v.GetNumPassengers() == 0) return false; } if (Target->GetType() == ACTOR_VEHICLE) { Vehicle t(Target); if (!t.IsValid() || t.IsParking() || t.IsUplifted() || t.IsDestroyed() || t.IsSmoking() || (t.GetVehicleType() != VT_NOSQUAD && t.GetVehicleType() != VT_GANGSTER_GETAWAY)) return false; } else if (Target->GetType() == ACTOR_PERSON) { Person p(Target); if(!p.IsValid() || p.IsLinkedWithPerson() || p.IsCarryingPerson() || p.GetEnteredCarID() != -1 || p.IsPhysicsSimulationEnabled() || p.GetRole() == ROLE_ANIMAL) return false; if(p.GetRole() == ROLE_GANGSTER) SetPriority(800); } return true; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Vehicle v(Caller); GameObject t(Target); if (childID == 0) { if (v.HasCommand(DUMMY_FOLLOW)) { v.RemoveCommand(DUMMY_FOLLOW); int VecID = v.GetID(); GameObjectList list = Game::GetGameObjects(NAME_DUMMYOBJECT); for(int i=0; i<list.GetNumObjects(); i++) { GameObject *obj = list.GetObject(i); if (obj->GetUserData() == VecID) { obj->PushActionDeleteOwner(ACTION_NEWLIST); } } } if (t.GetType() == ACTOR_VEHICLE) { Vehicle vt(&t); if (vt.HasName("stolencar") && !vt.WasStoppedByRoadblock()) { if (rand()%2 == 0) Audio::PlaySample3D(SND_CARTHEFT1, vt.GetPosition()); else Audio::PlaySample3D(SND_CARTHEFT2, vt.GetPosition()); } else if (vt.GetVehicleType() == VT_GANGSTER_GETAWAY && !vt.WasStoppedByRoadblock()) Audio::PlaySample3D(SND_ESCAPECAR, vt.GetPosition()); else if (vt.IsDriveByShooting() && !vt.WasStoppedByRoadblock()) Audio::PlaySample3D(SND_AMOK, vt.GetPosition()); } else if (t.GetType() == ACTOR_PERSON) { Person p(&t); if(p.GetRole() == ROLE_GANGSTER && p.IsFleeing()) Audio::PlaySample3D(SND_PERSON, p.GetPosition()); } if (v.HasObjectPath(NULL)) Game::ExecuteCommand(DUMMY_PATROL, &v, &v); v.PushActionExecuteCommand(ACTION_NEWLIST, CMD_FOLLOW, &t, 1, false); if (!v.HasCommand(DUMMY_HASSIREN) && v.HasCommand(CMD_AUTOSIREN_OFF) && !Input::LShiftPressed() && !Input::RShiftPressed()) Game::ExecuteCommand(CMD_SIREN, &v, &v); GameObject mDummy = Game::CreateObject("mod:Prototypes/Objects/Misc/empty.e4p", NAME_DUMMYOBJECT); mDummy.Hide(); mDummy.SetUserData(v.GetID()); Vector vPos = v.GetPosition(); mDummy.SetPosition(vPos); mDummy.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_UPDATEPOS, &t, 0, false); } if (childID == 1) { if (!v.HasCommand(DUMMY_FOLLOW)) v.AssignCommand(DUMMY_FOLLOW); v.PushActionMove(ACTION_NEWLIST, t.GetPosition(), true); v.PushActionExecuteCommand(ACTION_APPEND, CMD_FOLLOW, &t, 1, false); } } }; object DummyUpdateFollowPos : CommandScript { DummyUpdateFollowPos() { SetGroupID(DummyGroup); } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { } void PushActions(GameObject *Caller, Actor *Target, int childID) { GameObject t(Target); GameObject mDummy(Caller); int VecID = mDummy.GetUserData(); VehicleList l1(VT_POLICE_MTW, VT_POLICE_STW); for(int i = 0; i < l1.GetNumVehicles(); i++) { Vehicle v = l1.GetVehicle(i); if (v.GetID() == VecID) { if (!v.HasCommand(DUMMY_FOLLOW)) { mDummy.PushActionDeleteOwner(ACTION_NEWLIST); return; } else if (!v.IsValid() || v.IsDestroyed() || v.IsSmoking()) { mDummy.PushActionDeleteOwner(ACTION_NEWLIST); v.PushActionWait(ACTION_NEWLIST, 0.1f); return; } else if (!t.IsValid()) { mDummy.PushActionDeleteOwner(ACTION_NEWLIST); v.PushActionWait(ACTION_NEWLIST, 0.1f); return; } else { Vector vPos = v.GetPosition(); mDummy.SetPosition(vPos); mDummy.PushActionWait(ACTION_NEWLIST, 0.5f); mDummy.PushActionExecuteCommand(ACTION_APPEND, DUMMY_UPDATEPOS, &t, 0, false); } if (v.GetBoundingRadiusDistXYToObject(&t) < 900.f && t.GetType() == ACTOR_VEHICLE) { mDummy.PushActionDeleteOwner(ACTION_NEWLIST); Vehicle vt(&t); if (vt.GetVehicleType() != VT_GANGSTER_GETAWAY) { GameObject mBlock = Game::CreateObject("mod:Prototypes/Objects/Street/citypole.e4p", NAME_BLOCK); mBlock.SetUserData(t.GetID()); Vector bPos = t.GetPosition(); mBlock.SetPosition(bPos); mBlock.PushActionWait(ACTION_NEWLIST, 30.f); mBlock.PushActionExecuteCommand(ACTION_APPEND, DUMMY_UPDATEPOS, &t, 1, false); if (!mBlock.IsFlagSet(OF_HIDDEN)) mBlock.SetFlag(OF_HIDDEN); } else if (vt.GetVehicleType() == VT_GANGSTER_GETAWAY) { if (vt.HasObjectPath(NULL)) //Stop gangster vehicle vt.RemoveObjectPath(); } v.ClearActions(); Vector Move = t.GetPosition(); float r[9]; float childr[9]; t.GetRotation(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8]); float dx = -350.f, dy = 0.f, dz = 0.f; Math::RotateVector(dx, dy, dz, r); Math::EulerToMatrix(0.0f, 0.f, 0.f, childr); Math::MultiplyMatrices(childr, r); Move = Move + Vector(dx, dy, 0); Game::FindFreePosition(&v, Move, 250); v.PushActionMove(ACTION_NEWLIST, Move, true); v.PushActionWait(ACTION_APPEND, 0.5f); v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_FOLLOW, &t, 0, false); } else if (v.GetBoundingRadiusDistXYToObject(&t) < 600.f && t.GetType() == ACTOR_PERSON) { mDummy.PushActionDeleteOwner(ACTION_NEWLIST); Person pt(Target); if (pt.GetRole() != ROLE_GANGSTER && (pt.HasObjectPath(NULL) || pt.IsFleeing())) t.PushActionWait(ACTION_NEWLIST, 10.f); v.ClearActions(); v.PushActionWait(ACTION_NEWLIST, 0.5f); v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_FOLLOW, &t, 0, false); } return; } } mDummy.PushActionDeleteOwner(ACTION_NEWLIST); } }; object DummyFollow : CommandScript { DummyFollow() { SetGroupID(DummyGroup); } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { return false; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Vehicle v(Caller); Person p(Caller); GameObject t(Target); if (childID == 0) { if (v.HasCommand(DUMMY_HASSIREN) && v.HasCommand(CMD_AUTOSIREN_OFF)) Game::ExecuteCommand(DUMMY_DISABLE, &v, &v); PersonList l1 = v.GetPassengers(); Vector Pos = v.GetPosition(); Vector Pos2 = v.GetPosition(); float r[9]; float childr[9]; v.GetRotation(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8]); bool cop1 = false; bool cop2 = false; bool armed = false; bool shoot = false; bool fight = false; if (l1.GetNumPersons() >= 1) { if (l1.GetPerson(0)->HasCommand(CMD_ARREST) || l1.GetPerson(0)->HasCommand(CMD_ARREST2)) cop1 = true; } if (t.GetType() == ACTOR_VEHICLE) { Vehicle vt(Target); PersonList l2 = vt.GetPassengers(); if (l2.GetNumPersons() > 0 || vt.GetVehicleType() == VT_GANGSTER_GETAWAY) { armed = true; if (l1.GetNumPersons() > 1) { if (l1.GetPerson(1)->HasCommand(CMD_ARREST) || l1.GetPerson(1)->HasCommand(CMD_ARREST2)) cop2 = true; } } } else if (t.GetType() == ACTOR_PERSON) { Person pt(Target); if (pt.GetRole() == ROLE_GANGSTER) { armed = true; if (l1.GetNumPersons() > 1) { if (l1.GetPerson(1)->HasCommand(CMD_ARREST) || l1.GetPerson(1)->HasCommand(CMD_ARREST2)) cop2 = true; } if (pt.GetEquipment() == EQUIP_PISTOL) { if ((pt.GetBehaviour() == BEHAVIOUR_GANGSTER_ATTACKALL || pt.GetBehaviour() == BEHAVIOUR_GANGSTER_ATTACKSQUAD || pt.GetBehaviour() == BEHAVIOUR_GANGSTER_ATTACKSQUAD_SMART || pt.GetBehaviour() == BEHAVIOUR_GANGSTER_GUARDHOSTAGE) && rand()%10 > 5) shoot = true; else if (rand()%4 >= 1) fight = true; } } } if (cop1 && cop2) { v.SetCommandable(false); v.PlayAnimOpenDoor(DAT_PERSON, 0.8f, &v); v.PlayAnimOpenDoor(DAT_SPECIAL, 0.8f, &v); v.PushActionWait(ACTION_NEWLIST, 1.f); v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_FOLLOW, &t, 4, false); } else if (cop1) { v.SetCommandable(false); v.PlayAnimOpenDoor(DAT_PERSON, 0.8f, Caller); v.PushActionWait(ACTION_NEWLIST, 1.f); v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_FOLLOW, &t, 3, false); } Person p1; Person p2; if (cop1) { p1 = l1.GetPerson(0); float dx = -12.f, dy = -65.f, dz = 0.f; v.RemovePassenger(&p1); Math::RotateVector(dx, dy, dz, r); Math::EulerToMatrix(0.0f, 0.f, 0.f, childr); Math::MultiplyMatrices(childr, r); Pos = Pos + Vector(dx, dy, 0); p1.SetPosition(Pos); p1.SetRotation(childr[0], childr[1], childr[2], childr[3], childr[4], childr[5], childr[6], childr[7], childr[8]); p1.UpdatePlacement(); p1.Hide(); p1.PushActionWait(ACTION_NEWLIST, 0.8f); p1.PushActionShowHide(ACTION_APPEND, false); p1.PushActionSwitchAnim(ACTION_APPEND, "idle"); p1.PushActionTurnTo(ACTION_APPEND, &t); } if (cop2) { p2 = l1.GetPerson(1); float dx2 = -12.f, dy2 = 65.f, dz2 = 0.f; v.RemovePassenger(&p2); Math::RotateVector(dx2, dy2, dz2, r); Math::EulerToMatrix(0.0f, 0.f, 0.f, childr); Math::MultiplyMatrices(childr, r); Vector Pos2 = Pos2 + Vector(dx2, dy2, 0); p2.SetPosition(Pos2); p2.SetRotation(childr[0], childr[1], childr[2], childr[3], childr[4], childr[5], childr[6], childr[7], childr[8]); p2.UpdatePlacement(); p2.Hide(); p2.PushActionWait(ACTION_NEWLIST, 0.8f); p2.PushActionShowHide(ACTION_APPEND, false); p2.PushActionSwitchAnim(ACTION_APPEND, "idle"); p2.PushActionTurnTo(ACTION_APPEND, &t); } if (cop1) { if (t.GetType() == ACTOR_VEHICLE) { Vehicle vt(&t); if (armed) { vt.RemoveObjectPath(); vt.PushActionWait(ACTION_NEWLIST, 0.1f); if (p1.GetEquipment() != EQUIP_PISTOL && p1.HasCommand(CMD_DRAWGUN)) { p1.PushActionEquipWeapon(ACTION_APPEND, true); p1.AssignCommand(CMD_SHOOTGUN); p1.AssignCommand(CMD_HOLSTERGUN); p1.RemoveCommand(CMD_DRAWGUN); p1.AssignCommand(CMD_ARREST2); p1.RemoveCommand(CMD_ARREST); Vector Pos = p1.GetPosition(); Audio::PlaySample3D(SND_DRAW, Pos); } p1.PushActionSwitchAnim(ACTION_APPEND, "pistoltarget"); PersonList l3; if (vt.GetNumPassengers() > 0) l3 = vt.GetPassengers(); else if (vt.GetNumTransported() > 0) l3 = vt.GetTransports(); if (l3.GetNumPersons() > 0) { for(int i=0; i < l3.GetNumPersons(); i++) { l3.GetPerson(i)->PushActionWait(ACTION_NEWLIST, 2.f); l3.GetPerson(i)->PushActionLeaveCar(ACTION_APPEND, &vt); if (l3.GetPerson(i)->GetEquipment() == EQUIP_PISTOL && (l3.GetPerson(i)->GetBehaviour() == BEHAVIOUR_GANGSTER_ATTACKALL || l3.GetPerson(i)->GetBehaviour() == BEHAVIOUR_GANGSTER_ATTACKSQUAD || l3.GetPerson(i)->GetBehaviour() == BEHAVIOUR_GANGSTER_ATTACKSQUAD_SMART || l3.GetPerson(i)->GetBehaviour() == BEHAVIOUR_GANGSTER_GUARDHOSTAGE) && rand()%10 > 5) { shoot = true; l3.GetPerson(i)->SetPrimaryTarget(&p1); } else { l3.GetPerson(i)->PushActionWait(ACTION_APPEND, 1.f); l3.GetPerson(i)->PushActionSwitchAnim(ACTION_APPEND, "hostage_down"); } Person pt = l3.GetPerson(0); if (shoot) { p1.PushActionWait(ACTION_APPEND, 2.0f); p1.PushActionShoot(ACTION_APPEND, &pt); } else { p1.PushActionWait(ACTION_APPEND, 6.0f); p1.PushActionMove(ACTION_APPEND, &pt, TARGET_FOLLOW); p1.PushActionTurnTo(ACTION_APPEND, &pt); p1.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ARREST2, &p1, 3, false); if (rand()%4 >= 1) fight = true; p1.PushActionArrest(ACTION_APPEND, &pt, fight); if (v.GetFreeTransports() >= 1 && pt.GetRole() == ROLE_GANGSTER) p1.PushActionExecuteCommand(ACTION_APPEND, CMD_PUTINCAR, &v, 0, false); } if (cop2) { if (p2.GetEquipment() != EQUIP_PISTOL && p2.HasCommand(CMD_DRAWGUN)) { p2.PushActionEquipWeapon(ACTION_APPEND, true); p2.AssignCommand(CMD_SHOOTGUN); p2.AssignCommand(CMD_HOLSTERGUN); p2.RemoveCommand(CMD_DRAWGUN); p2.AssignCommand(CMD_ARREST2); p2.RemoveCommand(CMD_ARREST); Vector Pos = p2.GetPosition(); Audio::PlaySample3D(SND_DRAW, Pos); } if (shoot) { p2.PushActionSwitchAnim(ACTION_APPEND, "pistoltarget"); p2.PushActionWait(ACTION_APPEND, 2.0f); p2.PushActionShoot(ACTION_APPEND, &pt); } else { p2.PushActionTurnTo(ACTION_APPEND, &t); p2.PushActionSwitchAnim(ACTION_APPEND, "pistoltarget"); p2.PushActionWait(ACTION_APPEND, 6.5f); p2.PushActionSwitchAnim(ACTION_APPEND, "idlegun"); } return; } } } } else { p1.PushActionExecuteCommand(ACTION_APPEND, DUMMY_FOLLOW, Target, 2, false); } } else if (t.GetType() == ACTOR_PERSON) { Person pt(&t); if (armed) { if (p1.GetEquipment() != EQUIP_PISTOL && p1.HasCommand(CMD_DRAWGUN)) { p1.PushActionEquipWeapon(ACTION_APPEND, true); p1.AssignCommand(CMD_SHOOTGUN); p1.AssignCommand(CMD_HOLSTERGUN); p1.RemoveCommand(CMD_DRAWGUN); p1.AssignCommand(CMD_ARREST2); p1.RemoveCommand(CMD_ARREST); Vector Pos = p1.GetPosition(); Audio::PlaySample3D(SND_DRAW, Pos); } if (shoot) p1.PushActionShoot(ACTION_APPEND, &pt); else { if (pt.IsValid() && !pt.IsCurrentAnimation("hostage_down") && !pt.IsArrested() && !pt.IsDrowning() && !pt.IsCarried() && pt.GetState() == PERSONSTATE_NORMAL) { pt.ClearActions(); if (pt.HasObjectPath(NULL)) pt.RemoveObjectPath(); pt.SetBehaviour(BEHAVIOUR_GANGSTER_CIVILARMED); pt.SetDisableGangsterSymbol(false); pt.PushActionWait(ACTION_APPEND, 2.0f); pt.PushActionSwitchAnim(ACTION_APPEND, "hostage_down"); pt.PushActionWait(ACTION_APPEND, 20.0f); pt.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ARREST2, Target, 1, false); p1.PushActionTurnTo(ACTION_APPEND, &pt); p1.PushActionSwitchAnim(ACTION_APPEND, "pistoltarget"); p1.PushActionWait(ACTION_APPEND, 2.5f); p1.PushActionMove(ACTION_APPEND, &pt, TARGET_TOUCHPERSON); p1.PushActionExecuteCommand(ACTION_APPEND, DUMMY_ARREST2, Caller, 3, false); p1.PushActionArrest(ACTION_APPEND, &pt, fight); p1.PushActionWait(ACTION_APPEND, 1.f); p1.PushActionExecuteCommand(ACTION_APPEND, "Arrest", &pt, 5, false); //if (v.GetFreeTransports() >= 1 && pt.GetRole() == ROLE_GANGSTER) // p1.PushActionExecuteCommand(ACTION_APPEND, CMD_PUTINCAR, &v, 0, false); } } } else { if (p1.GetEquipment() == EQUIP_PISTOL) { p1.PushActionEquipWeapon(ACTION_APPEND, false); p1.RemoveCommand(CMD_SHOOTGUN); p1.RemoveCommand(CMD_HOLSTERGUN); p1.AssignCommand(CMD_DRAWGUN); p1.RemoveCommand(CMD_ARREST2); p1.AssignCommand(CMD_ARREST); Vector Pos = p1.GetPosition(); Audio::PlaySample3D(SND_HOLSTER, Pos); } p1.PushActionExecuteCommand(ACTION_APPEND, CMD_ARREST, &pt, 0, false); } } } if (t.GetType() == ACTOR_PERSON && cop2 && armed) { Person pt(&t); if (p2.GetEquipment() != EQUIP_PISTOL && p2.HasCommand(CMD_DRAWGUN)) { p2.PushActionEquipWeapon(ACTION_APPEND, true); p2.AssignCommand(CMD_SHOOTGUN); p2.AssignCommand(CMD_HOLSTERGUN); p2.RemoveCommand(CMD_DRAWGUN); p2.AssignCommand(CMD_ARREST2); p2.RemoveCommand(CMD_ARREST); Vector Pos = p2.GetPosition(); Audio::PlaySample3D(SND_DRAW, Pos); } if (shoot) p2.PushActionShoot(ACTION_APPEND, &pt); else { p2.PushActionTurnTo(ACTION_APPEND, &pt); p2.PushActionSwitchAnim(ACTION_APPEND, "pistoltarget"); p2.PushActionWait(ACTION_APPEND, 5.0f); p2.PushActionSwitchAnim(ACTION_APPEND, "idlegun"); } } } if (childID == 1) { int VecID = Caller->GetID(); GameObjectList list = Game::GetGameObjects(NAME_BLOCK); for(int i=0; i<list.GetNumObjects(); i++) { GameObject *obj = list.GetObject(i); if (obj->GetUserData() == VecID) { obj->PushActionDeleteOwner(ACTION_NEWLIST); } } } if (childID == 2) { p.PushActionMove(ACTION_APPEND, &t, TARGET_PASSENGERDOOR); p.PushActionTurnTo(ACTION_APPEND, &t); p.PushActionWait(ACTION_APPEND, 0.3f); p.PushActionSwitchAnim(ACTION_APPEND, "talkto"); p.PushActionWait(ACTION_APPEND, 3.0f); p.PushActionSwitchAnim(ACTION_APPEND, "idle"); p.PushActionExecuteCommand(ACTION_APPEND, DUMMY_FOLLOW, &t, 5, false); } if (childID == 3) { v.PlayAnimCloseDoor(DAT_PERSON, 0.8f, &v); v.SetCommandable(true); } if (childID == 4) { v.PlayAnimCloseDoor(DAT_SPECIAL, 0.8f, &v); v.PlayAnimCloseDoor(DAT_PERSON, 0.8f, &v); v.SetCommandable(true); } if (childID == 5) { int VecID = Target->GetID(); GameObjectList list = Game::GetGameObjects(NAME_BLOCK); for(int i=0; i<list.GetNumObjects(); i++) { GameObject *obj = list.GetObject(i); if (obj->GetUserData() == VecID) obj->PushActionDeleteOwner(ACTION_NEWLIST); } int Money = Mission::GetMoneyLeft(); int NewMoney = Money + 300; Mission::SetMoney(NewMoney); Mission::PlayHint("Driver fined for speeding. You earned 300 credits!"); } } };
  22. I'm some how guessing by your inability to form a proper sentence that no one will grant you 'signature' to use their work. Next, why did it say your stuff was deleted? Copyright violation? By who?
  23. Try modifying the LASiren.script - More simple version of the random code Hoppah provided in my LAChase post. I was going to do this as well... but have not yet. If there is a logic problem with this someone say so? int random = Math::rand()%3; if (random == 0) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Siren01.wav", CarPos, true); } else (random == 1) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Siren02.wav", CarPos, true); } else if (random == 2) { soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Siren03.wav", CarPos, true); } } }
  24. SirMoo

    LAChase

    Exactly what I wanted! I tried the exact something just with a few different patterns with different things for each else if. This is what I have mine set up now. Nothing major... just something for more than just speeding... int Money = Mission::GetMoneyLeft(); int Fine; int Chance = Math::rand() % 4; if (Chance == 0) { Fine = 300; Mission::PlayHint("Driver fined for speeding. You've earned 300 credits!"); } else if (Chance == 1) { Fine = 200; Mission::PlayHint("Driver fined for expired registration stick. You've earned 200 credits!"); } else if (Chance == 2) { Fine = 200; Mission::PlayHint("Driver fined for a missing tail light. You've earned 200 credits!"); } else if (Chance == 3) { Fine = 600; Mission::PlayHint("Driver fined for failure to use a seatbelt. You've earned 600 credits!"); } int NewMoney = Money + Fine; Mission::SetMoney(NewMoney);
  25. Thanks cbh84! I'd offer a hug... but some people tend to feel a little odd by such things. >_>
×
×
  • Create New...