Jump to content

eggcarton

Members
  • Posts

    268
  • Joined

  • Last visited

Posts posted by eggcarton

  1. I am currently working on a script based on the 3 pistol scripts (Draw, Shoot and Holster weapon).

    I have been successful in drawing the weapon (OBJ_WEAPON) and having the new commands appear. But when I click on Holster weapon it doesn't do anything.

    I think when I had the PushActionDrawWeapon it drew and holstered properly, but I had the problem since I took it out.

    The commented code is shown below


    const char CMD_SHOOTGUN[] = "Shoot";
    const char CMD_HOLSTERGUN[] = "Holster";
    const char CMD_DRAWGUN[] = "Draw";
    const char SND_DRAW[] = "mod:Audio/FX/Misc/DrawWeapon.wav";
    const char OBJ_WEAPON[] = "QLD Equipment/aim.v3o";
    const char HINT_HELICOPTER[] = "Draw PA";
    const char HINT_HELICOPR[] = "Holster PA";
    const char HINT_HCOPTER[] = "Shoot PA";

    object Draw : CommandScript
    {

    Draw()
    {
    SetValidTargets(ACTOR_PERSON);
    SetDoubleClickable(true);
    SetGroupID(CGROUP_GETEQUIPMENT);
    SetGroupLeader(true);
    SetPossibleEquipment(EQUIP_NONE);
    SetRestrictions(RESTRICT_SELFEXECUTE);
    SetDeselectCaller(false);
    SetPriority(700);
    }

    bool CheckGroupVisibility(GameObject *Caller)
    {
    if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON)
    return false;
    return !Caller->IsEquipped();
    }

    bool CheckPossible(GameObject *Caller)
    {
    if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON)
    return false;
    Person p(Caller);
    if(p.IsValid() && !p.IsLinkedWithPerson() && !p.IsCarryingPerson() && p.GetEnteredCarID() == -1)
    return true;
    return false;
    }

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

    Person p(Caller);
    if(p.IsValid() && !p.IsEquipped() && !p.IsLinkedWithPerson() && !p.IsCarryingPerson())
    return true;

    return false;
    }

    void PushActions(GameObject *Caller, Actor *Target, int childID)
    {
    //this all works - plays hint, gets OBJ_WEAPON, modifies commands etc.
    Mission::PlayHint(HINT_HELICOPTER);
    Person p(Caller);
    p.PlaceObjectInRightHand(OBJ_WEAPON);
    p.PushActionSwitchAnim(ACTION_APPEND, "idlegun");
    p.AssignCommand(CMD_SHOOTGUN);
    p.AssignCommand(CMD_HOLSTERGUN);
    p.RemoveCommand(CMD_DRAWGUN);

    Vector Pos = Caller->GetPosition();
    Audio::PlaySample3D(SND_DRAW, Pos);
    }
    };

    object Holster : CommandScript
    {

    Holster()
    {
    SetValidTargets(ACTOR_PERSON);
    SetDoubleClickable(false);
    SetGroupID(CGROUP_DRAW_WEAPON); //this should be GETEQUIPMENT
    SetRestrictions(RESTRICT_SELFEXECUTE);
    SetDeselectCaller(false);
    SetPriority(700);
    }

    bool CheckGroupVisibility(GameObject *Caller)
    {
    if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON)
    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->GetEquipment()==EQUIP_PISTOL)
    //return false;

    return false;
    }

    void PushActions(GameObject *Caller, Actor *Target, int childID)
    {
    //this is what it should execute. I have added the hint to see if it does anything, which it does not.
    Mission::PlayHint(HINT_HELICOPR);
    Person p(Caller);
    p.RemoveObjectInRightHand();
    p.RemoveCommand(CMD_SHOOTGUN);
    p.RemoveCommand(CMD_HOLSTERGUN);
    p.AssignCommand(CMD_DRAWGUN);

    Vector Pos = Caller->GetPosition();
    Audio::PlaySample3D(SND_HOLSTER, Pos);
    }
    };

    object Shoot : CommandScript //this doesn't do anything either, but lets ignore this for the moment
    {
    Shoot()
    {
    SetValidTargets(ACTOR_PERSON | ACTOR_VEHICLE | ACTOR_OBJECT);
    SetRestrictions(RESTRICT_SHOOTABLE | RESTRICT_NOTDESTROYED | RESTRICT_NOTINJURED);
    SetPriority(700);
    }

    bool CheckPossible(GameObject *Caller)
    {
    if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON)
    return false;
    Person p(Caller);
    if(!p.IsValid() || p.IsLinkedWithPerson() || p.GetEnteredCarID() != -1)
    return false;
    }

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

    Person t(Caller);
    if(!t.IsValid() || t.IsLinkedWithPerson() || t.GetEnteredCarID() != -1)
    return false;

    GameObject obj(Target);
    if(!obj.IsValid())
    return false;

    if(Target->GetType()==ACTOR_VEHICLE)
    {
    Vehicle v(Target);
    if (!v.IsCivilCar())
    SetPriority(-700); // low priority for shooting at squad cars

    if (!v.IsValid() || ((v.GetVehicleType() == VT_POLICE_PHC || v.GetVehicleType() == VT_AMBULANCE_RHC || v.GetVehicleType() == VT_THW_FGRT_BH) && !v.IsOnGround()))
    return false;
    }


    return false;
    }

    void PushActions(GameObject *Caller, Actor *Target, int childID)
    {
    Mission::PlayHint(HINT_HCOPTER);
    Caller->PushActionTurnTo(ACTION_NEWLIST, Target);
    Caller->PushActionShoot(ACTION_APPEND, Target);
    }
    };

    Thanks

    eggcarton

  2. I read somewhere on here that person models have to be edited by hand in notepad or something???

    Not sure where that post is though gruebel.gif

    Edit:

    Here it is http://forum.emergency-planet.com/index.php?/topic/7008-editing-person-models/

    I am not sure what you want to do exactly, but if you just import then thats what Zmod. will do, otherwise it won't affect in game unless you export it from Zmod. If you want to edit it then the link above explains.

  3. Case: Coolermaster Centurion 5 (v1)

    Motherboard: Gigabyte EP45-UD3P

    CPU: Intel Core 2 Duo E8400 (3.0Ghz)

    Ram:4 GB DDR2 Ram

    Graphics Gigabyte Nvidia 9800GT 512GB (Underclocked to prevent overheating)

    OS XP Pro SP3 (I want Win 7 x64 so I can use all/more RAM)

    HD Samsung 1TB HD Internal (Fastest non SSD HD according to SiSoftware Sandra benchmark)

    Samsung 1TB HD via e-SATA

    120GB Maxtor External

    Optical Drive Liteon DVD Burner

    Display Samsung Syncmaster 2233SW (22")

    Old Philips 150s 15" Display for extended desktop

  4. You can import the one from the game to edit. The file may need to be unlocked (like the skins) and then imported (File>Import).

    Delete the existing Arjent - Polygon mode - Hotkey 3, click on model, Select > Quadr, select existing lightbar (right click and drag) with selected mod on (spacebar). Once the lightbar has been selected press Delete.

    Import or merge the new lightbar, move/scale to position, attach to CV and export.

  5. I used Audacity. You will see 2 rows (tracks) of squiggly blue lines if it is in stereo. On the left hand side you will see a drop down box labeled 'Audio Track'. Select this and click 'split stereo track. Remove on of these tracks using the small x on the left and with the remaining track click the drop down box and select 'Mono'. Export as wav and you are done. :)

  6. The vehicles look superb. A couple of things though, one is with regards to the QPS POD, we don't have the LED display affixed like New South Wales PODs. The other is the strobe lighting on the QAS Sprinter, there are two little strobes, one on each side, just under the brake lights that you don't seem to have. I'm not sure if this is because of a limit, but I just thought I'd point it out.

    I'm nitpicking though; they really do look awesome.

    Yeah I am nit picky though (to some degree).

    I forgot to take the message board off because it was originally for the Sydney Mod and I followed an ambulance yesterday morning and noticed the LEDs down the bottom and put them one when I got home yesterday. :D

    And also that video is still using the NSW skin for the Varley Pod. It has been changed to the new Isuzu D-Max markings since then.

    Also added the stickers to the unmarked cars so they look a bit more like police cars since it is hard to see the antennas.

    Thanks

    eggcarton

  7. Mate, I want to have your love child. That looks awesome.

    On a more serious note, I've got a small burst from the priority from the old QPS siren if you'd like it. It's not the best quality, but it might be something you'd want to use. It's in an AMR file (whatever the hell that is - That's Samsung for you), so if you'd like it, let me know.

    On a similar note, if you require voice acting, let me know. QPS is my specialty, but I can do some Firecom or QAS stuff too.

    That would be great if you had that part of the siren. I did have it in another file but I don't know what happened to it. That old siren would have to be one of the most unusual siren in the world with both the tones and the setup.

    Also with the voice acting that would be great. I was just thinking about that while mowing the lawn today. I will send you a PM when I get a chance. The mod will probably use call signs for each type of vehicle rather than each vehicle eg. General Duties = November214, Highway Patrols = N902 or Normal Ambulances = Bravo 123, ICPs = Alpha 414 etc.

    Thanks

    eggcarton

×
×
  • Create New...