Jump to content

soulbody

Members
  • Posts

    949
  • Joined

  • Last visited

Posts posted by soulbody

  1. In the editor its listed as firefighters_asf. Your trying to dispatch it based on the vehicle type, rather then a vehicle prototype. The script has to call a specific prototype.

    SetIcon("callpatrolcar");

    Ok first make sure you change this to something like calltowtruck.

    Second, keep in mind you need to dispatch the tow truck by its prototype. Something like:

    n = Game::CreateVehicle(PROTO_TOW, UNNAMED);

    Then define proto_tow above.

    well line 121 is according to back-up for units in the area on stand-by, patrol and at the station.

    the seticon is temperorly (excuse my english) but can not cause the error, the icon is there in-game and there is nothing mentioned in the error message or logfile.

    According to PROTO_TOW... this is already being done, i change everything needed to be done excactly like i did in the call humvee, army truck and blackhawk commands and those commands works.

  2. Are you sure the tow truck is classified as VT_THW_ASF?

    Perhaps its something to do with the word patrolCars?

    If you can copy and paste a similar command here, like call police back up. Doesnt need to be the whole script, just the code for the command.

    well according to this site: ''http://www.emergency...dex.php/Vehicle'' it need to be ''VT_FIREFIGHTERS_ASF'' i tried that but it crash with the same message behind it was standing ''TODO: ist jetzt THW''

    so i tried ''VT_THW_ASF as well but either that make it crash, i used/edited this command for the army units, those units are units without the patrol command either and there it doesn't crash...

    Error Logfile:

    (_LACallTowTruck8b2e5): Error: Symbol VT_THW_ASF is not defined in current scope

    Logfile:

    ?(_LACallTowTruck8b2e5): Error: Symbol VT_THW_ASF is not defined in current scope <div>?(_LACallTowTruck8b2e5):  FILE:mod:/scripts/game/command/LACallTowTruck.script8b2e5 LINE:121</div><div>?(_LACallTowTruck8b2e5): !!!Dictionary position rewound... </div>?(_LACallTowTruck8b2e5): !!!Error recovered!!!

  3. I'm busy with a back-up pack but there is one unit which does not work as it have to.

    i'm trying to let police call back-up from a tow truck but then i got a error. according the log file the error is caused by line 121:

    in search for line 121 and came to this:

    		VehicleList patrolCars(VT_THW_ASF);

    i know did is wrong but i also tried this

    		VehicleList patrolCars(VT_FIREFIGHTERS_ASF);

    can anybody tell me what i need to use for the tow truck, nothing seems to work here.

    The hole script:

    //******************************************************************************************
    // #Version 1.2#
    //
    // Includes: Backup command for police units.
    //
    // - PcmdCallPatrolCar
    //
    // Script by Hoppah
    // Thanks to Bass-Ti for his help
    //
    // Usage of this script in other mods is NOT allowed without permission of Hoppah
    //
    //******************************************************************************************

    const char CMD_SIREN[] = "VcmdSiren";
    const char CMD_AUTOSIREN_OFF[] = "VcmdAutoSirenOff";
    const char CMD_WARNINGLIGHTS_OFF[] = "VcmdWarningLightsOff";
    const char CMD_WARNINGLIGHTS_ON[] = "VcmdWarningLightsOn";
    const char CMD_FLOODLIGHTS_OFF[] = "VcmdFloodLightsOff";
    const char CMD_FLOODLIGHTS_ON[] = "VcmdFloodLightsOn";
    const char CMD_STANDBY_ON[] = "VcmdStandbyOn";
    const char CMD_STANDBY_OFF[] = "VcmdStandbyOff";
    const char DUMMY_HASSIREN[] = "DummyHasSiren";
    const char DUMMY_PATROL[] = "DummyPatrol";
    const char HINT_NOPATROLCAR[] = "No patrol car available!";
    const char HINT_BACKUP[] = "Backup is on its way!";
    const char HINT_PATROLCARBOUGHT[] = "Patrol car bought for $1000 and dispatched!";
    const char VO_PARK01[] = "policestation_park01";
    const char VO_PARK02[] = "policestation_park02";
    const char VO_PARK03[] = "policestation_park03";
    const char SND_BATBACKUP[] = "mod:Audio/FX/radio/bat_pd.wav";
    const char SND_EMSBACKUP[] = "mod:Audio/FX/radio/ems_pd.wav";
    const char SND_PDBACKUP[] = "mod:Audio/FX/radio/pd_backup.wav";
    const char VO_SPAWN_ALL[] = "spawn_all";
    const char VO_SPAWN_POLICE01[] = "spawn_police1";
    const char VO_SPAWN_POLICE02[] = "spawn_police2";
    const char VO_SPAWN_ALLR[] = "spawn_allr";
    const char VO_SPAWN_POLICE01R[] = "spawn_police1r";
    const char VO_SPAWN_POLICE02R[] = "spawn_police2r";
    const char OBJ_OFFICER_M[] = "mod:Prototypes/Persons/03 LA Police/lapd_officer_m.e4p";
    const char OBJ_OFFICER_LASD[] = "mod:Prototypes/Persons/03 LA Police/lasd_officer.e4p";
    const char OBJ_OFFICER_CHP[] = "mod:Prototypes/Persons/03 LA Police/chp_officer.e4p";
    const char OBJ_TRAFFIC_OFFICER_LASD[] = "mod:Prototypes/Persons/03 LA Police/lasd_traffic_officer.e4p";
    const char OBJ_TRAFFIC_OFFICER_CHP[] = "mod:Prototypes/Persons/03 LA Police/chp_traffic_officer.e4p";
    const char OBJ_BATTALION_CHIEF[] = "mod:Prototypes/Persons/02 LA Fire Department/battalion_chief.e4p";
    const char OBJ_EMS_CAPTAIN[] = "mod:Prototypes/Persons/01 LA Ambulance/ems_paramedic_captain.e4p";
    const char PROTO_CV_LAPD[] = "mod:Prototypes/Vehicles/04 LA Tec/rollback.e4p";
    const char PROTO_CV_CHP[] = "mod:Prototypes/Vehicles/04 LA Tec/rollback.e4p";
    const char PROTO_CV_LASD[] = "mod:Prototypes/Vehicles/04 LA Tec/rollback.e4p";
    const char PROTO_CHARGER_LAPD[] = "mod:Prototypes/Vehicles/04 LA Tec/rollback.e4p";
    const char UNNAMED[] = "Unnamed";

    object PcmdCallTowTruck : CommandScript
    {
    PcmdCallTowTruck()
    {
    SetIcon("callpatrolcar");
    SetCursor("callassistance");
    SetValidTargets(ACTOR_FLOOR | ACTOR_VIRTUAL);
    SetDeselectCaller(false);
    SetSelfClickActivation(true);
    SetHighlightingEnabled(false);
    SetGroupID(CGROUP_GETEQUIPMENT);
    SetGroupLeader(true);
    }

    bool CheckPossible(GameObject *Caller)
    {
    GameObjectList SelectPer = Game::GetSelectedGameObjects();
    if (SelectPer.GetNumObjects() != 1)
    return false;

    Person p(Caller);
    if(p.IsValid() && (p.IsLinkedWithPerson() || p.IsCarryingPerson() || p.IsEquipped() || p.IsPulling() || p.GetFirehoseID()!=0 || p.GetEnteredCarID() != -1))
    return false;

    if (p.IsCurrentAction("EActionTreatPerson"))
    return false;

    if (!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON)
    return false;

    return true;
    }

    bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
    {
    if(!Caller->IsValid() || Caller->GetID() == Target->GetID())
    return false;

    if (Caller->GetType() != ACTOR_PERSON)
    return false;

    Person p(Caller);
    if(p.IsValid() && (p.IsLinkedWithPerson() || p.IsCarryingPerson() || p.IsEquipped() || p.IsPulling() || p.GetFirehoseID()!=0 || p.GetEnteredCarID() != -1))
    return false;

    if (p.IsCurrentAction("EActionTreatPerson"))
    return false;

    return true;
    }

    void PushActions(GameObject *Caller, Actor *Target, int ChildID)
    {
    Vector CmdPos = Game::GetCommandPos();
    Caller->PushActionTurnTo(ACTION_NEWLIST, CmdPos);
    Caller->PushActionSwitchAnim(ACTION_APPEND, "talkmike");
    Caller->PushActionWait(ACTION_APPEND, 3.5f);
    Caller->PushActionSwitchAnim(ACTION_APPEND, "idle");

    if(StrCompare(Caller->GetPrototypeFileName(), OBJ_BATTALION_CHIEF) == 0)
    Audio::PlaySample3D(SND_BATBACKUP, Caller->GetPosition());
    else if(StrCompare(Caller->GetPrototypeFileName(), OBJ_EMS_CAPTAIN) == 0)
    Audio::PlaySample3D(SND_EMSBACKUP, Caller->GetPosition());
    else
    Audio::PlaySample3D(SND_PDBACKUP, Caller->GetPosition());

    Vehicle *theCar = NULL;
    float bestCar = 0.;
    VehicleList patrolCars(VT_THW_ASF);
    for (int i = 0; i < patrolCars.GetNumVehicles(); i++)
    {
    Vehicle *aCar = patrolCars.GetVehicle(i);
    if (aCar->GetPlayerMP() == Caller->GetPlayerMP() && !aCar->IsCurrentAnimation("Getoff") && (aCar->HasCommand(CMD_STANDBY_OFF) || aCar->HasCommand(DUMMY_PATROL) || aCar->IsCollidingWithVirtualObject(VO_PARK01) || aCar->IsCollidingWithVirtualObject(VO_PARK02) || aCar->IsCollidingWithVirtualObject(VO_PARK03)))
    {
    float distCurrCar = Math::dist(CmdPos.x, CmdPos.y, aCar->GetPosition().x, aCar->GetPosition().y);
    if (distCurrCar < bestCar || bestCar == 0.)
    {
    theCar = aCar;
    bestCar = distCurrCar;
    }
    }
    }
    if (theCar)
    {
    Mission::PlayHint(HINT_BACKUP);
    if (!theCar->HasCommand(DUMMY_HASSIREN) && theCar->HasCommand(CMD_AUTOSIREN_OFF) && !Input::LShiftPressed() && !Input::RShiftPressed())
    Game::ExecuteCommand(CMD_SIREN, theCar, theCar);
    theCar->PushActionWait(ACTION_NEWLIST, 0.3f);
    if (theCar->HasCommand(DUMMY_PATROL))
    theCar->PushActionExecuteCommand(ACTION_APPEND, DUMMY_PATROL, theCar, 1, false);
    theCar->PushActionMove(ACTION_APPEND, CmdPos);
    if (theCar->HasCommand(CMD_STANDBY_OFF))
    {
    theCar->RemoveCommand(CMD_STANDBY_OFF);
    theCar->AssignCommand(CMD_STANDBY_ON);
    }
    if (theCar->HasCommand(CMD_WARNINGLIGHTS_OFF))
    {
    theCar->EnableBlinker(BLT_NONE);
    theCar->RemoveCommand(CMD_WARNINGLIGHTS_OFF);
    theCar->AssignCommand(CMD_WARNINGLIGHTS_ON);
    }
    if (theCar->HasCommand(CMD_FLOODLIGHTS_OFF))
    {
    theCar->EnableSpecialLights(false);
    theCar->RemoveCommand(CMD_FLOODLIGHTS_OFF);
    theCar->AssignCommand(CMD_FLOODLIGHTS_ON);
    }
    } else
    {
    Vector Spawn;
    Vector Rotate;
    ActorList l1 = Game::GetActors(VO_SPAWN_ALL);
    ActorList l2 = Game::GetActors(VO_SPAWN_POLICE01);
    ActorList l3 = Game::GetActors(VO_SPAWN_POLICE02);
    ActorList l4 = Game::GetActors(VO_SPAWN_ALLR);
    ActorList l5 = Game::GetActors(VO_SPAWN_POLICE01R);
    ActorList l6 = Game::GetActors(VO_SPAWN_POLICE02R);
    if(l1.GetNumActors() == 0 && l2.GetNumActors() == 0 && l3.GetNumActors() == 0)
    {
    Mission::PlayHint(HINT_NOPATROLCAR);
    return;
    }
    if(l1.GetNumActors() > 0)
    {
    Spawn = l1.GetActor(0)->GetPosition();
    Rotate = l4.GetActor(0)->GetPosition();
    }
    System::Log("Buy patrol car");
    int Money = Mission::GetMoneyLeft();
    if (Money <= 1000)
    {
    Mission::PlayHint(HINT_NOPATROLCAR);
    return;
    }

    int NewMoney = Money - 1000;
    Mission::SetMoney(NewMoney);
    Vehicle n;
    Person p1;
    Person p2;
    Person p(Caller);
    if(StrCompare(p.GetPrototypeFileName(), OBJ_BATTALION_CHIEF) == 0)
    {
    if(l1.GetNumActors() == 0 && l2.GetNumActors() > 0)
    {
    Spawn = l3.GetActor(0)->GetPosition();
    Rotate = l6.GetActor(0)->GetPosition();
    }
    n = Game::CreateVehicle(PROTO_CHARGER_LAPD, UNNAMED);
    n.SetSpeed(8.0f);

    }
    else if(StrCompare(p.GetPrototypeFileName(), OBJ_OFFICER_LASD) == 0 || StrCompare(p.GetPrototypeFileName(), OBJ_TRAFFIC_OFFICER_LASD) == 0)
    {
    if(l1.GetNumActors() == 0 && l3.GetNumActors() > 0)
    {
    Spawn = l3.GetActor(0)->GetPosition();
    Rotate = l6.GetActor(0)->GetPosition();
    }
    n = Game::CreateVehicle(PROTO_CV_LASD, UNNAMED);
    n.SetSpeed(8.0f);
    }
    else if(StrCompare(p.GetPrototypeFileName(), OBJ_OFFICER_CHP) == 0 || StrCompare(p.GetPrototypeFileName(), OBJ_TRAFFIC_OFFICER_CHP) == 0)
    {
    if(l1.GetNumActors() == 0 && l3.GetNumActors() > 0)
    {
    Spawn = l3.GetActor(0)->GetPosition();
    Rotate = l6.GetActor(0)->GetPosition();
    }
    n = Game::CreateVehicle(PROTO_CV_CHP, UNNAMED);
    n.SetSpeed(8.0f);

    }
    else
    {
    if(l1.GetNumActors() == 0 && l2.GetNumActors() > 0)
    {
    Spawn = l2.GetActor(0)->GetPosition();
    Rotate = l5.GetActor(0)->GetPosition();
    }
    n = Game::CreateVehicle(PROTO_CV_LAPD, UNNAMED);
    n.SetSpeed(8.0f);
    }
    n.SetPlayerMP(Caller->GetPlayerMP());
    n.SetMaxPassengers(0);
    n.SetMaxTransports(0);
    Game::FindFreePosition(&n, Spawn);
    n.SetPosition(Spawn);
    n.UpdatePlacement();
    n.Hide();
    n.PushActionTurnTo(ACTION_NEWLIST, Rotate);
    n.PushActionWait(ACTION_APPEND, 2.5f);
    n.PushActionShowHide(ACTION_APPEND, false);
    n.PushActionMove(ACTION_APPEND, CmdPos);
    if (Game::IsMission())
    {
    n.RemoveCommand("VcmdToPoliceStation");
    n.RemoveCommand("VcmdPatrol");
    }

    if (!n.HasCommand(DUMMY_HASSIREN) && n.HasCommand(CMD_AUTOSIREN_OFF) && !Input::LShiftPressed() && !Input::RShiftPressed())
    Game::ExecuteCommand(CMD_SIREN, &n, &n);

    Mission::PlayHint(HINT_PATROLCARBOUGHT);
    }
    }
    };

  4. and what are you going to do?

    if you can't do anything don't take the lead on a mod.

    we can use those people to make some good mods instead of 100 beta's... it's annoying to see thousand of uncompleted mods and see some other person starting even a mod without being able to do anything

  5. im never liked the idea of buying around 10 expansions for 30 euro each and the game for 60 each so you have a total price from 360,- euro for a game.

    ambitions is the best expansion i saw in all sims games, except from ''home animals'' (literal translation from NL: Huis dieren)

  6. Main story:

    some man are trying to bring some drugs into the country, prevent the ship from deliver the drugs to the destination.

    Tactics:

    1. enter the ship by helicopter, enter the rooms and arrest the man inside.

    2. let the ship enter the harbor while transport the drugs into the harbor arrest every man into the harbor, be carefully for shooting gangstars.

    3. stop the car transporting the drugs towards the mansion using the chase commands (with helicopter assist) or spike strips. then arrest the man still in the harbor.

    It required a big map. i advice to make a new map but that is a lot of work.

  7. you can use it when a car is stolen in the freeplat, the car will drive over it, get out of control and the thief will leave the vehicle... he will escape on foot or shoot any unit which he says.

    in my opinion the best option to get a stolen car is the chase command after you send a chopper on the car.

  8. it seems the animation for the paramedic team are not right, you can try reinstalling the game.

    BTW did you change anything of the those files:

    Save/campaignprogress.xml

    optgraph.dll

    that couldn't be opened, so did you change rights like ''read only'' or that kind, if so change this back before trying to reinstall the game. and try out to start the game again

  9. My exams has being finished and know waiting for the rash... (google translation NL: uitslag)

    This means i'm now able to focus myself on this project, i'm already a week trying out some scripts.

    Sadly enough most are without any part of succes... i still not able make scripts.

    But i notice that my skills are growing i'm able to make some more parts then i could before i now some more code's

    This will hopefully hold on saw i can do the last parts i need to know soon either

    This means that not every feature planned for the Realism Mod will not be there in the first Release when it comes to it.

    Those features will be added later.

    Also some contacts have being given to me which can help me learning to script better. I will contact them soon and see where it comes.

    Your Faithfully,

    Soulbody - I Mark's Productions

  10. btw, i see it is the VO where crew get inside the vehicle and not the spawn place, the vehicles doesnt have a vo to enter the vehicle... the script is made like this:

    Alarm launched, script check which VO_... is filled with a car and then check inside how many crew is available and then send the crew toward the vehicle and let use the command EnterVehicle.

    for this is use the Caller / Target C++ code so there is no VO... but i dont know what you exactly what to do... then im able to help you...

×
×
  • Create New...