Jump to content
fireboss-tulsa

anyone know were i replace the vehicle?

Recommended Posts

need help with finding were to change the vehicle, or if someone got the read me file

const 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.0

object 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 finden

ol = Game::GetGameObjects("tec");

// fahrzeug anwaehlen

o = *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 ausgeben

Mission::PlayHint("Einsatz für den Techniker");

Audio::PlaySample("mod:audio/fx/tec.wav");

// fahrzeug auf "im einsatz" setzen

v.AssignCommand("ich_bin_nicht_frei");

// wache-eingang finden

al=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 erzeugen

if (!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 spawnen

GameObject *px(p);

Game::FindFreePosition(px, spawnpos, 100);

p.SetPosition(spawnpos);

p.SetEquipment(EQUIP_THW_CASE);

// " set commandable false

p.PushActionExecuteCommand(ACTION_NEWLIST, COMMANDABLE_FALSE, &p, 1, true);

// " set commandable true

p.PushActionExecuteCommand(ACTION_APPEND, COMMANDABLE_TRUE, &p, 1, true);

// " in fahrzeug einsteigen

p.PushActionExecuteCommand(ACTION_APPEND, "entercar", o, 0, false);

}

// Techniker // besatzung erzeugen

if (!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 spawnen

GameObject *px(p);

Game::FindFreePosition(px, spawnpos, 100);

p.SetPosition(spawnpos);

p.SetEquipment(EQUIP_THW_CASE);

// " set commandable false

p.PushActionExecuteCommand(ACTION_NEWLIST, COMMANDABLE_FALSE, &p, 1, true);

// " set commandable true

p.PushActionExecuteCommand(ACTION_APPEND, COMMANDABLE_TRUE, &p, 1, true);

// " in fahrzeug einsteigen

p.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 losfaehrt

v.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 true

v.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 basis

v.PushActionExecuteCommand(ACTION_APPEND, INBASE_FALSE, &v, 1, true);

if (!vinbase)

{

// warnleuchten aus

v.PushActionExecuteCommand(ACTION_APPEND, "VCmdWarningLightsOff", &v, 1, true);

}

// losfahren zum einsatzort

v.PushActionExecuteCommand(ACTION_APPEND, "Status3",Caller,0,false);

v.PushActionmove(ACTION_APPEND, tpos);

v.PushActionExecuteCommand(ACTION_APPEND, "Status4",Caller,0,false);

}

}

};

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...