Jump to content

timmiej93

Members
  • Posts

    207
  • Joined

  • Last visited

Everything posted by timmiej93

  1. Aha, like that. Thanks for clarifying loot!
  2. As the title says, I'm wondering what the CONST CHAR UNNAMED does. I found it in the LAFireStationStart script, and I'm not quite sure what it's used for, and if it's maybe causing any errors on usage in multiple scripts. Hopefully someone can explain it's functionality. Tim
  3. You probably are using the wrong map, I've been editing the wrong one sometimes too. You should use the one in "...Emergency 4\Mods\Los Angeles Mod v2.1\Maps", and not any of the subfolders in the "Maps" folder. Tim
  4. Quick question: When you raise the alarm on the firestation, do the people get in the trucks? Second qestions: Could you upload your log to PasteBucket and copy the link here? Tim
  5. It could be the firestation has the wrong name, the object itself. The original firestation is called fire_station. It's found in the original LAFireStationStart script under the const(ant) char(arcter) NAME_FIRESTATION. It looks like this, and can be found at the top of the script. const char NAME_FIRESTATION[] = "fire_station";Now there's two things you can do to get this to work (if this is the problem). You could simply rename the firestation object you placed in the editor to "fire_station" (without the quotes ofcourse)(This is the easy way), or you could change the value behind NAME_FIRESTATION to whatever your firestation is called. This could cause some problems with other scripts though, I'm not sure. This COULD help, I can't promise anything. Let me know if it works. Tim
  6. Hey Sniper, Thanks for explaining, I figured something like this should do the trick. I did try messing with those values myself, but I got som errors. Maybe those where from different things, and not from the gates. I'll give it another go when I'm back home and I'll let you know if it worked. Tim -------- Just noticed I've somehow switched over to my old account I couldn't get access to the last time I tried. This is the same person as Tim Derks posted above. Again, now I've added those lines you stated, I'm getting all kinds of errors. It's even so bad right now that placing the LAPoliceStation and LAPoliceStationStart scripts in the Scripts folder results in 2 empty firehouses with the roofs on and gates closed, and no vehicles at the policestation. That part of the log is stated below: The PoliceStationStart.script is stated here: PoliceStationStart.script I hope somebody can see what's wrong Tim
  7. Ok so this is how to check if the towtruck has a load right? v.GetCarriedObjects().GetNumObjects()>0 When i hit the button now, it doesn't do anything exept for turning of the flashing lights.
  8. Aha, well that explains a lot. I'll check if it will work without that part of code and i'll let u know. Thnx Tim
  9. Hey, I am currently editing the LAFireStationStart.script for something, and i added a sort of extra firestation, but without the building, just the VO's. Unfortunatly i found something in the script that I don't understand. In the script there's the following: const char NAME_GATE01A[] = "fs_gate01a"; GameObjectList gate01a = Game::GetGameObjects(NAME_GATE01A); for(int i=0; i < gate01a.GetNumObjects(); i++) GameObject *gate1 = gate01a.GetObject(i); Now there are 8 of these. I added one. So now I went looking for the "fs_gate01a" as a virtual object in the editor. For some weird reason I can't find it anywhere. Am I missing something? I tried some logical things, but none of them worked. Does anyone know anything about this??? Tim
  10. Hey, thanks for responding. I think I got the basics scripted right now, but I would like to make the transported vehicle disappear after 5 (or so) seconds, without blowing it up and damaging something. Here's the script: Download //****************************************************************************************** // #Version 1.0# // // Includes: To salvage station command. // // - VcmdToSalvageStation // // Script by Tim with use of Hoppah's scripts. // //****************************************************************************************** const char CMD_TOSALVAGE[] = "VcmdToSalvageStation"; const char CMD_SIREN[] = "VcmdSiren"; const char CMD_AUTOSIREN_OFF[] = "VcmdAutoSirenOff"; const char CMD_WARNINGLIGHTS[] = "VcmdWarningLightsOn"; const char DUMMY_WARNINGLIGHTS[] = "DummyHasWarningLights"; const char DUMMY_GOHOME[] = "DummyGoHome"; const char CMD_FLASHINGLIGHTS[] = "VcmdFlashingLights"; const char CMD_GOHOME[] = "GoHome"; const char CMD_UNLOAD[] = "unload"; const char CMD_LOADUP[] = "loadup"; const char OBJ_TOWTRUCK[] = "mod:Prototypes/Vehicles/02 LA TEC/tow_truck.e4p"; const char OBJ_ROLLBACK[] = "mod:Prototypes/Vehicles/04 LA TEC/rollback.e4p"; const char VO_SALVAGE1[] = "salvage_gate01"; const char VO_TURNTO1[] = "salvage_vogate01a"; const char VO_SALVAGE01[] = "salvage01"; const char VO_SALVAGE02[] = "salvage02"; const char VO_SALVAGE03[] = "salvage03"; const char VO_SALVAGE_DROPOFF[] = "salvage_dropoff"; const char VO_SALVAGE_DROPOFF_TURNTO[] = "salvage_dropoff_turnto"; const char SND_TOSTATION[] = "mod:Audio/FX/radio/1019.wav"; const char HINT_NOTVALID[] = "This vehicle doesn't belong in the fire station!"; const char HINT_NOSPACE_SALVAGE[] = "No space at the Salvage Station, vehicle returns to base!"; const char HINT_NOSPACE_AMBULANCE[] = "No space at the fire station, vehicle starts a patrol!"; const char HINT_TRANSPORTS[] = "The ambulance has transports, it will go to the hospital first!"; int DummyGroup = 32; object VcmdToSalvageStation : CommandScript { VcmdToSalvageStation() { SetCursor("tosalvagestation"); SetIcon("tosalvagestation"); SetGroupID(DummyGroup); SetGroupLeader(true); SetRestrictions(RESTRICT_SELFEXECUTE); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; if (!Game::IsFreeplay()) return false; Vehicle v(Caller); if (v.IsCollidingWithVirtualObject(VO_SALVAGE01) || v.IsCollidingWithVirtualObject(VO_SALVAGE02) || v.IsCollidingWithVirtualObject(VO_SALVAGE03)) return false; if (!v.HasCommand("MoveTo")) 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_TEC_ASF && v.GetCarriedObjects().GetNumObjects()>0) { ActorList l1 = Game::GetActors(VO_SALVAGE_DROPOFF); ActorList l2 = Game::GetActors(VO_SALVAGE_DROPOFF_TURNTO); v.AssignCommand(CMD_UNLOAD); }else if (v.IsBlueLightEnabled()) Game::ExecuteCommand(CMD_FLASHINGLIGHTS, &v, &v); if (v.HasCommand(DUMMY_WARNINGLIGHTS)) { v.EnableBlinker(BLT_NONE); v.RemoveCommand(DUMMY_WARNINGLIGHTS); v.AssignCommand(CMD_WARNINGLIGHTS); } if (v.HasObjectPath(NULL)) Game::ExecuteCommand(DUMMY_GOHOME, &v, &v); if(StrCompare(v.GetPrototypeFileName(), OBJ_TOWTRUCK) == 0 || StrCompare(v.GetPrototypeFileName(), OBJ_ROLLBACK) == 0) { bool Possible = false; GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_SALVAGE01, l4, ACTOR_VEHICLE); if(l4.GetNumObjects() == 0 && !Possible) Possible = true; GameObjectList l5; Game::CollectObstaclesOnVirtualObject(VO_SALVAGE02, l5, ACTOR_VEHICLE); if(l5.GetNumObjects() == 0 && !Possible) Possible = true; GameObjectList l6; Game::CollectObstaclesOnVirtualObject(VO_SALVAGE03, l6, ACTOR_VEHICLE); if(l6.GetNumObjects() == 0 && !Possible) Possible = true; if (Possible) { ActorList l1 = Game::GetActors(VO_SALVAGE1); ActorList l2 = Game::GetActors(VO_TURNTO1); } else { Mission::PlayHint(HINT_NOSPACE_SALVAGE); v.PushActionExecuteCommand(ACTION_NEWLIST, CMD_GOHOME, Caller, 0, false); return; } } Vehicle v(Caller); if(StrCompare(v.GetPrototypeFileName(), OBJ_TOWTRUCK) == 0 || StrCompare(v.GetPrototypeFileName(), OBJ_ROLLBACK) == 0) { ActorList l2 = Game::GetActors(VO_TURNTO1); if (!Game::IsSquadInVirtualObject(VO_SALVAGE01) && !Game::IsSquadInVirtualObject(VO_SALVAGE02) && !Game::IsSquadInVirtualObject(VO_SALVAGE03)) { ParkinglotFound = true; ActorList l1 = Game::GetActors(VO_SALVAGE01); } else if (Game::IsSquadInVirtualObject(VO_SALVAGE01) && !Game::IsSquadInVirtualObject(VO_SALVAGE02) && !Game::IsSquadInVirtualObject(VO_SALVAGE03)) { ParkinglotFound = true; ActorList l1 = Game::GetActors(VO_SALVAGE02); } else if (Game::IsSquadInVirtualObject(VO_SALVAGE01) && Game::IsSquadInVirtualObject(VO_SALVAGE02) && !Game::IsSquadInVirtualObject(VO_SALVAGE03)) { ParkinglotFound = true; ActorList l1 = Game::GetActors(VO_SALVAGE03); } else if (!Game::IsSquadInVirtualObject(VO_SALVAGE01) && Game::IsSquadInVirtualObject(VO_SALVAGE02) && !Game::IsSquadInVirtualObject(VO_SALVAGE03)) { ParkinglotFound = true; ActorList l1 = Game::GetActors(VO_SALVAGE02); ActorList l3 = Game::GetActors(VO_SALVAGE01); if(l3.GetNumActors() > 0) Vector Forward = l3.GetActor(0)->GetPosition(); GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_SALVAGE02, l4, ACTOR_VEHICLE); for (int i = 0; i < l4.GetNumObjects(); i++) { Vehicle m = l4.GetObject(i); m.PushActionMove(ACTION_NEWLIST, Forward); } } else if (!Game::IsSquadInVirtualObject(VO_SALVAGE01) && !Game::IsSquadInVirtualObject(VO_SALVAGE02) && Game::IsSquadInVirtualObject(VO_SALVAGE03)) { ParkinglotFound = true; ActorList l1 = Game::GetActors(VO_SALVAGE02); ActorList l3 = Game::GetActors(VO_SALVAGE01); if(l3.GetNumActors() > 0) Vector Forward = l3.GetActor(0)->GetPosition(); GameObjectList l4; Game::CollectObstaclesOnVirtualObject(VO_SALVAGE03, l4, ACTOR_VEHICLE); for (int i = 0; i < l4.GetNumObjects(); i++) { Vehicle m = l4.GetObject(i); m.PushActionMove(ACTION_NEWLIST, Forward); } } else if (!Game::IsSquadInVirtualObject(VO_SALVAGE01) && Game::IsSquadInVirtualObject(VO_SALVAGE02) && Game::IsSquadInVirtualObject(VO_SALVAGE03)) { ParkinglotFound = true; ActorList l1 = Game::GetActors(VO_SALVAGE03); ActorList l3 = Game::GetActors(VO_SALVAGE01); if(l3.GetNumActors() > 0) Vector Forward = l3.GetActor(0)->GetPosition(); ActorList l4 = Game::GetActors(VO_SALVAGE02); if(l4.GetNumActors() > 0) Vector Forward2 = l4.GetActor(0)->GetPosition(); float rot[9]; float childRot[9]; GameObjectList l5; Game::CollectObstaclesOnVirtualObject(VO_SALVAGE02, l5, ACTOR_VEHICLE); for (int i = 0; i < l5.GetNumObjects(); i++) { Vehicle m = l5.GetObject(i); m.PushActionMove(ACTION_NEWLIST, Forward); } GameObjectList l6; Game::CollectObstaclesOnVirtualObject(VO_SALVAGE03, l6, ACTOR_VEHICLE); for (int i = 0; i < l6.GetNumObjects(); i++) { Vehicle c = l6.GetObject(i); c.PushActionWait(ACTION_NEWLIST, 0.7f); c.PushActionMove(ACTION_APPEND, Forward2); } } else { Mission::PlayHint(HINT_NOSPACE_SALVAGE); v.PushActionExecuteCommand(ACTION_NEWLIST, CMD_GOHOME, Caller, 0, false); return; } } } };
  11. Hey, I'm, trying to make a towtruck station, but therefore I need a return to "..." Vcmd. It's just that I don't have a clue how to make a new one like this. I did assign VcmdToTowTruck to the tow truck, but do I have to link this Vcmd to a script in some way??? Ofcourse there must be a script behind the Vcmd, or else it's just useless, but how do I link the two?? I hope you understand what I mean, if not please leave a message. Tim
  12. seriously, the LA mod was the only thing that kept EM4 playable.... Well we just respect your decision, and can only hope that EM 2012 offers more...
  13. Alright, i'll trow in some of my german skills here (A) I think Fahre_Patrouille means Drive_patrol, Giving the car an idea where to go or something like that. Patrouille_frei would meen something like stop patrolling. And about the missing traffic lights, I think the maker of the winterberg mod just made patrolling paths that would never interfere with civil patroling paths. not sure though.
  14. Well... I'm affraid we'll have to try on the if statement. Maybe that our PC's can handle it, i don't know. But it wil still be tricky.
  15. Good point. Yeah that would probably beat the game up. I also don't know if this only occurs on cop cars (probably doesn't) I almost never have a ambulance on patrol so i don't know about that.
  16. No i can't figure it out either, even with my german skills. I actually think it looks more like a Beta then the 7th release or something. Warez groups?? Never heard of those... But you don't know anyone with experience on that topic?? I mean you could always look on the internet, but i doubt if you can find it there. Yeah could you please clarify that piece?? I mean, when i play the game only lags when i select more than 10 vehicles, and even than it only lags for a sec...
  17. Nice... But we'll still try. maybe we'll find another way to do this. @Xplorer I noticed that the freeplay map of the winterberg mod doesn't have traffic lights. (as far as i could see) are you sure there are traficlights there?
  18. Hmm, you really have a point there with your Light 1 NH etc. I assume Light 2 NH means red light , 1 is yellow (orange, whatever you like) and 0 is green?? Btw there isn't a script for the civil cars following the paths ingame is there?? I thought this is also is programmed into the game, but i'm not sure. I'll try to work on this too, whenever i have a moment for myself
  19. Uhm.. Double posted this for some reason.... Sorry 'bout that. Cant remove i assume??
  20. btw do you know the command for comparing prototypes exactly?? I don't seem to be able to find it anywhere....
  21. Ok thats an idea, but which script unloads the trucks??
  22. Again: If you did actually figured this out, please let us know so that we can use this in our games, PLEASE. Edit: I do have the winterberg mod working now (Don't understand a crap of it cuz i'm used to the LA mod). So i looked through the scripts, but i can't find a patrol like script anywhere. No patrol, no patroulieren.... Nothing like that. Does anyone know which script i do need?
  23. Ok Ill start reading the script over and over then untill i understand it Thanx for the advise so far
  24. Yeah i allready figured that out, so i was thinking: Can't there spawn some extra stretcher cariers or have those three run multiple times??
×
×
  • Create New...