Emergency Defender Posted February 2, 2008 Report Share Posted February 2, 2008 I want to start off simple with the first mission of my mod, but I need to know the following:-How do I set these as my mission requirements? >Arrest two gangsters >Collect an item (a video camera) as evidence >Tow a stolen vehicle wreck to base >Take away the injured-How do I change the dialouge of a person?-How do I change the description of a mission?I've already figured out how to set them to gangsters, injured, etc.I know it's alot, but any help is appreciated. The manual was not at all helpful in showing me what to do. Thank you! Quote Link to comment Share on other sites More sharing options...
Emergency Defender Posted February 20, 2008 Author Report Share Posted February 20, 2008 Please help. It's getting frustrating. Quote Link to comment Share on other sites More sharing options...
Hoppah Posted February 20, 2008 Report Share Posted February 20, 2008 Try this one.const char NAME_OBJECT[] = "camera"; //Name of evidence (make sure it can be picked up)const char NAME_CAR[] = "stolencar"; //Name of stolen carconst char OBJ_OBJECT[] = "Equipment/tvcamera.V3O"; //Path to model of evidenceconst char OBJECTIVE_TERROR[] = "Arrest two gangsters!";const char OBJECTIVE_CAR[] = "Tow the stolen vehicle wreck to base!";const char OBJECTIVE_OBJECT[] = "Collect evidence!";const char OBJECTIVE_TRANSPORT[] = "Take away the injured!";object Mission01 : MissionScript{ GameObject mObject; Mission01() { System::SetEnv("e3_doocclusion", 0); } ~Mission01() { System::SetEnv("e3_doocclusion", 1); } void Start() { GameObjectList list = Game::GetGameObjects(); for(int i = 0; i < list.GetNumObjects(); ++i) { GameObject *obj = list.GetObject(i); if(obj->HasName(NAME_OBJECT)) { mObject = *obj; //if (!mObject.IsFlagSet(OF_PORTABLE)) // mObject.SetFlag(OF_PORTABLE); } } Mission::AddObjective(OBJECTIVE_TERROR); Mission::AddObjective(OBJECTIVE_TOW); Mission::AddObjective(OBJECTIVE_OBJECT); Mission::AddObjective(OBJECTIVE_TRANSPORT); } bool OnCheckCommand(const char* Command, GameObject *Caller, Actor *Target) { switch(Command) { case "PickUp": { if(Caller->GetType() == ACTOR_PERSON) { if((!Caller->HasCommand("Arrest") || Caller->HasCommand("GetFlashgrenade")) && Target->GetID() == mObject.GetID()) return false; } break; } } return true; } ActionCallbackResult OnAbortAction(const char *Action, ActionCallback* Data) { switch(Action) { case "EActionPickUp": { if(Data->Parameters[0].iValue == mObject.GetID() && Data->Parameters[1].iValue >= 2) { Person owner(Data->Owner); owner.PlaceObjectInRightHand(OBJ_OBJECT); owner.EnableCommand("Arrest", false); owner.EnableCommand("Redirect", false); owner.EnableCommand("Drop", false); owner.EnableCommand("GetRoadBlock", false); owner.EnableCommand("Halt", false); owner.EnableCommand("HaltVehicle", false); } break; } } return ACTION_CONTINUE; } void OnMissionLeft(GameObject *obj) { if(obj->GetID() == mObject.GetID()) Mission::SetObjectiveAccomplished(OBJECTIVE_OBJECT, true); else if (obj->HasName(NAME_CAR)) Mission::SetObjectiveAccomplished(OBJECTIVE_CAR, true); } MissionState GetMissionState() { if(Mission::GetCounter("Gangsters") == 0) { if(!Mission::IsObjectiveAccomplished(OBJECTIVE_TERROR)) Mission::SetObjectiveAccomplished(OBJECTIVE_TERROR, true); } else { if(Mission::IsObjectiveAccomplished(OBJECTIVE_TERROR)) Mission::SetObjectiveAccomplished(OBJECTIVE_TERROR, false); } if(Mission::GetCounter("Injured Persons") + Mission::GetCounter("Dead Persons") == 0) { if(!Mission::IsObjectiveAccomplished(OBJECTIVE_TRANSPORT)) Mission::SetObjectiveAccomplished(OBJECTIVE_TRANSPORT, true); } else { if(Mission::IsObjectiveAccomplished(OBJECTIVE_TRANSPORT)) Mission::SetObjectiveAccomplished(OBJECTIVE_TRANSPORT, false); } if(Mission::IsDefaultLogicNegative()) return MISSION_FAILED; if(Mission::IsDefaultLogicPositive() && Mission::AllObjectivesAccomplished()) return MISSION_SUCCEEDED; return MISSION_RUNNING; } bool SerializeTo(ScriptSerializer *Stream) { int version = 0x100; Stream->Write(version); Stream->Write(mObject); return true; } bool SerializeFrom(ScriptSerializer *Stream) { int version; Stream->Read(version); Stream->Read(mObject); return true; }};Copy/paste this text into an empty Notepad file and save as mission01.script.You can change the text between the brackets in the first 7 lines.About the evidence. Use a police officer to collect it. Make sure he has the command PickUp.When he picks the evidence up, the videocamera will be put in his hand. Send him in a car to HQ to finish that objective. Quote Link to comment Share on other sites More sharing options...
Emergency Defender Posted February 20, 2008 Author Report Share Posted February 20, 2008 Thanks, but I've run into trouble. I can't get the script to be part of the mission. :1046275142_sniper: Is that done from the editor or elsewhere? Quote Link to comment Share on other sites More sharing options...
Hoppah Posted February 21, 2008 Report Share Posted February 21, 2008 Use this file: .../Specs/campaign.xml Quote Link to comment Share on other sites More sharing options...
Ami89E1234 Posted February 22, 2008 Report Share Posted February 22, 2008 quick question:what programming language does EM3 - EM4 use?it looks like C++ but ive noticed it has some differencesi dont want to read this entire C++ book if its for nothing lol thx Quote Link to comment Share on other sites More sharing options...
Emergency Defender Posted March 25, 2008 Author Report Share Posted March 25, 2008 What is needed to create new vehicles/units? Examples: new paint, lightbars, sirens, etc. Quote Link to comment Share on other sites More sharing options...
Ami89E1234 Posted March 25, 2008 Report Share Posted March 25, 2008 a program like zmodeler2 where you create models. then, you make a skin and give the model a UV Map. you model on lightbars, wheels, doors, etc. you add it to the game, and you can use the lights editor on that vehicle to put lights on a vehicle. for sirens, you need to find some american sirens and in the audio files in your mod folder in the em file, you add it and add it to the files in the editor that go with your vehicle. Quote Link to comment Share on other sites More sharing options...
Hoppah Posted March 26, 2008 Report Share Posted March 26, 2008 quick question:what programming language does EM3 - EM4 use?it looks like C++ but ive noticed it has some differencesi dont want to read this entire C++ book if its for nothing lol thxC++ programming and ofcourse its different, because Emergency 4 has C++ codes for that game only. Quote Link to comment Share on other sites More sharing options...
Ami89E1234 Posted March 26, 2008 Report Share Posted March 26, 2008 thx, Hoppah Quote Link to comment Share on other sites More sharing options...
Emergency Defender Posted July 3, 2008 Author Report Share Posted July 3, 2008 Use this file: .../Specs/campaign.xmlThanks, man, but after a two-week course in basic C++, I now realize that I don't HAVE C++. Thanks anyway, though. Quote Link to comment Share on other sites More sharing options...