Jump to content
Guest firemike550

LA chase command

Recommended Posts

Guest firemike550

could someone send me the file for the LA Chase Command so i can add it in to work with project reality lights

EDIT: i dont have the editor, is there any way i can get it again, or would i have to rebuy the game again? i have the money so i can do it either way

EDIT: i am trying to repair it right now to see if i can get back the editor

EDIT: i have the editor back, now how do i add the command in?

Link to comment
Share on other sites

Guest firemike550
It's in there, you just need to add that command into the list of commands in the editor for that vehicle.

would the editor happen to be one of the programs that comes with the game?

Link to comment
Share on other sites

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!");
}
}
};

Link to comment
Share on other sites

Guest firemike550
If he has 1.9 he doesnt need the script. Its in the mod already.

well heres the problem, im using project reality lights which yes the script is in there already, but a long time ago my editor somehow got removed from my computer, so i dont know how to get it back other then buying the game again

Link to comment
Share on other sites

well heres the problem, im using project reality lights which yes the script is in there already, but a long time ago my editor somehow got removed from my computer, so i dont know how to get it back other then buying the game again

You need the editor to add the commands. If you don't have the editor then you can't give the vehicles the commands.

Link to comment
Share on other sites

well heres the problem, im using project reality lights which yes the script is in there already, but a long time ago my editor somehow got removed from my computer, so i dont know how to get it back other then buying the game again

Most of the submods are not compatible with v1.9 yet. Light changes to vehicles are saved in the same file as the commands each vehicle has, so when you install a mod which changes lights of vehicles, you will be missing the Chase Command, because that command is new in v1.9.

Link to comment
Share on other sites

Guest firemike550
Most of the submods are not compatible with v1.9 yet. Light changes to vehicles are saved in the same file as the commands each vehicle has, so when you install a mod which changes lights of vehicles, you will be missing the Chase Command, because that command is new in v1.9.

so there is no way of adding it to the modded light vehciles then correct?

Link to comment
Share on other sites

Guest firemike550
You can add the command in the editor.

i wen in the editor and i went to the mod then went to the vehicles and found the police, but there is no command in there, there was no LAchase, so what should i do?

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