fireboss-tulsa Posted May 7, 2013 Report Share Posted May 7, 2013 need help with finding were to change the vehicle, or if someone got the read me fileconst char IMG_ICON[] = "tec";const char IMG_CURSOR[] = "send";const char COMMANDABLE_TRUE[] = "DUMMYSetCommandableTrue";const char COMMANDABLE_FALSE[] = "DUMMYSetCommandableFalse";const char FREEFORALERT_TRUE[] = "DUMMYFPSetFreeForAlertTrue";const char FREEFORALERT_FALSE[] = "DUMMYFPSetFreeForAlertFalse";const char FREEFORALERT[] = "DUMMYFPIsFreeForAlert";const char INBASE_TRUE[] = "DUMMYFPSetInBaseTrue";const char INBASE_FALSE[] = "DUMMYFPSetInBaseFalse";const char INBASE[] = "DUMMYFPIsInBase";// 1.0object rufe_tec : CommandScript{rufe_tec(){SetIcon(IMG_ICON);SetCursor(IMG_CURSOR);SetValidTargets(ACTOR_FLOOR | ACTOR_STREET);}bool CheckPossible(GameObject *Caller){return true;}bool CheckTarget(GameObject *Caller, Actor *Target, int childID){Person p(Caller);if (!Game::IsFreeplay())return false;if (Caller->GetID() == Target->GetID())return false;return true;}void PushActions(GameObject *Caller, Actor *Target, int childID){GameObjectList ol;GameObject *o;ActorList al;Actor spawnpoint;Vector spawnpos;Person p;float rot[9];float childRot[9];Vector tpos;PersonList pl;// fahrzeug findenol = Game::GetGameObjects("tec");// fahrzeug anwaehleno = *ol.GetObject(0);Vehicle v(o);// frei fuer einsatz?if (v.HasCommand("ich_bin_nicht_frei")){ Mission::PlayHint("Techniker nicht Einsatzbereit");return;}else{// alarm-meldung ausgebenMission::PlayHint("Einsatz für den Techniker");Audio::PlaySample("mod:audio/fx/tec.wav");// fahrzeug auf "im einsatz" setzenv.AssignCommand("ich_bin_nicht_frei");// wache-eingang findenal=Game::GetActors("personalTEC");if(al.GetNumActors() > 0){spawnpoint = *al.GetActor(0);spawnpos = spawnpoint.GetPosition();}else{Mission::PlayHint("Kann Personal-Eingang nicht finden!");return;}// besatzung erzeugen?bool ob_tec = false;pl = v.GetPassengers();for(int i=0; i < pl.GetNumPersons(); i++){if (pl.GetPerson(i)->HasCommand("repair")){ob_tec = true;}}bool vinbase = false;if(v.HasCommand(INBASE)){vinbase = true;//Mission::PlayHint("Fahrzeug ist auf seinem Stellplatz");}// Techniker // besatzung erzeugenif (!ob_tec && vinbase){p = Game::CreatePerson("mod:Prototypes/Persons/Technik/Techniker.e4p","tecp");p.GetRotation(rot[0], rot[1], rot[2], rot[3], rot[4], rot[5], rot[6], rot[7], rot[8]);Math::EulerToMatrix(0.f, 0.f, 0.f, childRot);Math::MultiplyMatrices(childRot, rot);p.SetRotation(childRot[0], childRot[1], childRot[2], childRot[3], childRot[4], childRot[5], childRot[6], childRot[7], childRot[8]);// " an wache-eingang spawnenGameObject *px(p);Game::FindFreePosition(px, spawnpos, 100);p.SetPosition(spawnpos);p.SetEquipment(EQUIP_THW_CASE);// " set commandable falsep.PushActionExecuteCommand(ACTION_NEWLIST, COMMANDABLE_FALSE, &p, 1, true);// " set commandable truep.PushActionExecuteCommand(ACTION_APPEND, COMMANDABLE_TRUE, &p, 1, true);// " in fahrzeug einsteigenp.PushActionExecuteCommand(ACTION_APPEND, "entercar", o, 0, false);}// Techniker // besatzung erzeugenif (!ob_tec && vinbase){p = Game::CreatePerson("mod:Prototypes/Persons/Technik/Techniker.e4p","tecp");p.GetRotation(rot[0], rot[1], rot[2], rot[3], rot[4], rot[5], rot[6], rot[7], rot[8]);Math::EulerToMatrix(0.f, 0.f, 0.f, childRot);Math::MultiplyMatrices(childRot, rot);p.SetRotation(childRot[0], childRot[1], childRot[2], childRot[3], childRot[4], childRot[5], childRot[6], childRot[7], childRot[8]);// " an wache-eingang spawnenGameObject *px(p);Game::FindFreePosition(px, spawnpos, 100);p.SetPosition(spawnpos);p.SetEquipment(EQUIP_THW_CASE);// " set commandable falsep.PushActionExecuteCommand(ACTION_NEWLIST, COMMANDABLE_FALSE, &p, 1, true);// " set commandable truep.PushActionExecuteCommand(ACTION_APPEND, COMMANDABLE_TRUE, &p, 1, true);// " in fahrzeug einsteigenp.PushActionExecuteCommand(ACTION_APPEND, "entercar", o, 0, false);}//// besatzung einsatzbereit?bool ready = false;if (ob_tec){ready= true;}// in basis?if (vinbase){// zeit zum einsteigen, bevor fahrzeug losfaehrtv.PushActionWait(ACTION_APPEND, 12.0);}v.SetSpeed(13.0f);// nicht in basis und nicht einsatzbereit?if (!ready && !vinbase)){//Mission::PlayHint(v.GetName());Mission::PlayHint("Ohne Personal, Einsatz nicht möglich!");return;}// fahrzeug set commandable truev.PushActionExecuteCommand(ACTION_APPEND, COMMANDABLE_TRUE, &v, 1, true);// Warnlichter an!v.PushActionExecuteCommand(ACTION_APPEND,"VCmdBlau",Caller,3,false);//Wenn nicht in Basis aber Einsatzbereit?tpos = Game::GetCommandPos();if (!vinbase && ready){v.EnableBlueLights(true);v.PushActionExecuteCommand(ACTION_NEWLIST, "Status3",Caller,0,false);v.PushActionmove(ACTION_APPEND, tpos);v.PushActionExecuteCommand(ACTION_APPEND, "Status4",Caller,0,false);}// verlaesst basisv.PushActionExecuteCommand(ACTION_APPEND, INBASE_FALSE, &v, 1, true);if (!vinbase){// warnleuchten ausv.PushActionExecuteCommand(ACTION_APPEND, "VCmdWarningLightsOff", &v, 1, true);}// losfahren zum einsatzortv.PushActionExecuteCommand(ACTION_APPEND, "Status3",Caller,0,false);v.PushActionmove(ACTION_APPEND, tpos);v.PushActionExecuteCommand(ACTION_APPEND, "Status4",Caller,0,false);}}}; Quote Link to comment Share on other sites More sharing options...
Chris07 Posted May 8, 2013 Report Share Posted May 8, 2013 What exactly are you trying to do? What is this script? Quote Link to comment Share on other sites More sharing options...