Michael Jones Posted June 27, 2013 Report Share Posted June 27, 2013 I'm looking to add radio commands that the police officers can use (shots fired, etc) but i have no modding experience and no idea how to add them to the command group. I've alreafy got some of the clips from real police scanners i want to use. Quote Link to comment Share on other sites More sharing options...
Handsup! Posted June 28, 2013 Report Share Posted June 28, 2013 I'm sure a scripted here could tell you how to do it. By the sounds of it, all you'd need to get is a script that activated a sound file. Maybe look at the scripts that call units with a radio sound and remove only the bit that calls the actual unit.These are just guesses!Anyway, once you've got the script, add it to the unit via the editor. Edit->Scene->Persons->(the police folder)->(your chosen unit)->Press on edit->edit commands->(find the command you want)->press the arrow facing left->Done! (I think) Quote Link to comment Share on other sites More sharing options...
Michael Jones Posted July 19, 2013 Author Report Share Posted July 19, 2013 I've been fiddling around with the call patrol car script in LA mod version 2.1. I put a WAV file i have in and replaced the pd backup call that was there (overwrited it) with my file. I won't play the file in game and i can't figure out how to remove the backup from coming. Quote Link to comment Share on other sites More sharing options...
The Loot Posted July 19, 2013 Report Share Posted July 19, 2013 I've been fiddling around with the call patrol car script in LA mod version 2.1. I put a WAV file i have in and replaced the pd backup call that was there (overwrited it) with my file. I won't play the file in game and i can't figure out how to remove the backup from coming. Save the following as a new .script file, and add "PcmdShotsFired" to the person in the editor. const char SND_PDBACKUP[] = "mod:Audio/FX/radio/pd_backup.wav"; //rename if sound file differentconst char UNNAMED[] = "Unnamed";const char HINT_SHOTS[] = "Shots fired!";object PcmdShotsFired : CommandScript{PcmdShotsFired() {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 (1){Audio::PlaySample3D(SND_PDBACKUP, Caller->GetPosition()); Mission::PlayHint(HINT_SHOTS); return;} }} Quote Link to comment Share on other sites More sharing options...