james23222000 Posted April 10, 2008 Report Share Posted April 10, 2008 (edited) Edit: Problem with script, see hereHello to everyone,I have noticed people in the forum asking if it is possible for a K9 (police dog) script to make the dog attack or make people surrender. I have been scrutinising the Armed Arrest script that Hoppah has in his LA mod and have deemed it possible.So soon I will be starting the scripting for this. I will require some help, this will be:2 scripting assisters - Anyone who is competant in command scripting, emergency 4 editor and emergency 4 to aid the progress of the script1 person for general aid - Some one who can reply to forum posts when I am busy with the script. Job given to Bruce563Benefits:Will be mentioned in the Read me section of the scriptWill recieve the script before anyone else does.Watch this space for updatesRegardsJames Edited November 22, 2008 by james23222000 Quote Link to comment Share on other sites More sharing options...
pyrothijs Posted April 10, 2008 Report Share Posted April 10, 2008 Hello to everyone,I have noticed people in the forum asking if it is possible for a K9 (police dog) script to make the dog attack or make people surrender. I have been scrutinising the Armed Arrest script that Hoppah has in his LA mod and have deemed it possible.So soon I will be starting the scripting for this. I will require some help, this will be:2 scripting assisters - Anyone who is competant in command scripting, emergency 4 editor and emergency 4 to aid the progress of the script1 person for general aid - Some one who can reply to forum posts when I am busy with the script.Benefits:Will be mentioned in the Read me section of the scriptWill recieve the script before anyone else does.Watch this space for updatesRegardsJamesI don't mind helping with the editor part, but I'not a very good scripter... Quote Link to comment Share on other sites More sharing options...
Guest __Uknow__ Posted April 10, 2008 Report Share Posted April 10, 2008 Hello to everyone,I have noticed people in the forum asking if it is possible for a K9 (police dog) script to make the dog attack or make people surrender. I have been scrutinising the Armed Arrest script that Hoppah has in his LA mod and have deemed it possible.So soon I will be starting the scripting for this. I will require some help, this will be:2 scripting assisters - Anyone who is competant in command scripting, emergency 4 editor and emergency 4 to aid the progress of the script1 person for general aid - Some one who can reply to forum posts when I am busy with the script.Benefits:Will be mentioned in the Read me section of the scriptWill recieve the script before anyone else does.Watch this space for updatesRegardsJamesDo you have any experience with scripting?Do you know wich part to use?Do you know how to edit the scripts?I know what I'm talking about. The K9-Script is a real pain in the a**. You only need to change 1 line BUT there are none animations available for the dog to combine them with. Try to allow a police officer to link up with a dog and see what I mean Quote Link to comment Share on other sites More sharing options...
james23222000 Posted April 10, 2008 Author Report Share Posted April 10, 2008 Do you have any experience with scripting?Do you know wich part to use?Do you know how to edit the scripts?I know what I'm talking about. The K9-Script is a real pain in the a**. You only need to change 1 line BUT there are none animations available for the dog to combine them with. Try to allow a police officer to link up with a dog and see what I meanI do have experience with scripting, I know how to edit any scripts and which parts to use. I know about that but but I a mstill going to do it Quote Link to comment Share on other sites More sharing options...
Guest Gabone Posted May 4, 2008 Report Share Posted May 4, 2008 Hey ! Im working on a script me too for a K-9 Unit... but i have a problem lol i cant find my script in the edit ?! I'm stuck and i can't test the script. Anyone might give me a hint? Quote Link to comment Share on other sites More sharing options...
Guest __Uknow__ Posted May 4, 2008 Report Share Posted May 4, 2008 if you copy a full script make sure to change the script names inside the script Quote Link to comment Share on other sites More sharing options...
topfuzz Posted July 6, 2008 Report Share Posted July 6, 2008 just what i was hopeing for good luck with the script hope you guys can make k-9 unit Quote Link to comment Share on other sites More sharing options...
james23222000 Posted November 9, 2008 Author Report Share Posted November 9, 2008 (edited) My logfile tells me that the script only works upto childID 1. I have looked over and over agin for the problem but can't find anything. Does anyone have any ideas as to why it might not be working.// Script created by james23222000// DO NOT USE IN ANY OTHER MOD WITHOUT DIRECT PERMISSION FROM JAMES23222000object SendK9 : CommandScript{ SendK9() { SetValidTargets(ACTOR_PERSON); SetPossibleCallers(ACTOR_PERSON); SetPriority(500); SetIcon("senddog"); SetCursor("arrest"); SetPossibleExists(CPE_NONIJURED_PERSON); SetRestrictions(RESTRICT_NOTARRESTED | RESTRICT_NOTINJURED); } bool CheckPossible(GameObject *Caller) { if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON) return false; return true; } bool CheckGroupVisibility(GameObject *Caller) { if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON) return false; Person p(Caller); return p.IsLinkedWithPerson(); } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if(!Caller->IsValid()) return false; if(!Target->IsValid() || Target->GetType() != ACTOR_PERSON) return false; Person p(Caller); Person tp(Target); Person t = p.GetArrested(); if(!p.IsValid() || !t.IsValid() || p.GetEnteredCarID() != -1) return false; if(p.GetID()== Target->GetID() || Target->GetID()== t.GetID()) return true; if(!t.HasAnimation("bark")) return false; return true; } void PushActions(GameObject *Caller, Actor *Target, int childID) { if (childID == 0) { Person p(Caller); Person tp(Target); Person t = p.GetArrested(); Caller->PushActionTurnTo(ACTION_NEWLIST, Target); Caller->PushActionRelease(ACTION_NEWLIST); Caller->PushActionSwitchAnim(ACTION_APPEND,"senddog"); Caller->PushActionWait(ACTION_APPEND,2); Caller->PushActionSwitchAnim(ACTION_APPEND,"Idle"); tp.PushActionTurnTo(ACTION_NEWLIST, &t); System::Log("SendK9, childID == 0"); t.PushActionExecuteCommand(ACTION_APPEND, "SendK9", NULL, 1, false); } if (childID == 1) //Go to target { Person p(Caller); Person tp(Target); Person t = p.GetArrested(); t.PushActionMove(ACTION_NEWLIST, Target, TARGET_FOLLOW); t.PushActionWait(ACTION_APPEND, 0.5f); t.PushActionExecuteCommand(ACTION_APPEND, "SendK9", NULL, 2, false); System::Log("SendK9, childID == 1"); } if (childID == 2) //Dog Attack { Person p(Caller); Person tp(Target); Person t = p.GetArrested(); t.PushActionSwitchAnim(ACTION_APPEND, "attack"); t.PushActionWait(ACTION_APPEND, 3.0f); tp.PushActionSwitchAnim(ACTION_APPEND, "fistfight01"); tp.PushActionWait(ACTION_APPEND, 1.5f); t.PushActionExecuteCommand(ACTION_APPEND, "SendK9", NULL, 4, false); tp.PushActionExecuteCommand(ACTION_APPEND, "SendK9", NULL, 3, false); System::Log("SendK9, childID == 2"); } if (childID == 3) //Injure Person { Person p(Caller); Person tp(Target); Person t = p.GetArrested(); tp.Injure(INJUREREASON_ENERGY, true); System::Log("SendK9, childID == 3"); } if (childID ==4) //Dog barks { Person p(Caller); Person tp(Target); Person t = p.GetArrested(); t.PushActionSwitchAnim(ACTION_APPEND, "idle"); t.PushActionWait(ACTION_APPEND, 1.5f); t.PushActionSwitchAnim(ACTION_APPEND, "bark"); t.PushActionExecuteCommand(ACTION_APPEND, "SendK9", NULL, 5, false); System::Log("SendK9, childID == 4"); } if (childID == 5) //Rescue leader calls dog { Person p(Caller); Person tp(Target); Person t = p.GetArrested(); Caller->PushActionMove(ACTION_NEWLIST, Target, TARGET_FOLLOW); Caller->PushActionCallDog(ACTION_NEWLIST, &t); System::Log("SendK9, childID == 5"); } }};RegardsJames Edited November 18, 2008 by james23222000 Quote Link to comment Share on other sites More sharing options...
Commander Rasseru Posted November 10, 2008 Report Share Posted November 10, 2008 Wow, Finally someone is working on this. I try to bring this up before and some keep saying it won't work. But a few think it would work. I know it could since dogs can attack it game.I would love to to use this Police Dog in Tokyo Mod also.Will the dog able to search or follow? Quote Link to comment Share on other sites More sharing options...
james23222000 Posted November 18, 2008 Author Report Share Posted November 18, 2008 Anyone got any ideas about why the script isn't working?@Commander Rasseru: Follow and attack.RegardsJames Quote Link to comment Share on other sites More sharing options...
Guest __Uknow__ Posted November 18, 2008 Report Share Posted November 18, 2008 if I see it fast you dont give any value to ChildID so the default value is 0 Quote Link to comment Share on other sites More sharing options...
james23222000 Posted November 18, 2008 Author Report Share Posted November 18, 2008 if I see it fast you dont give any value to ChildID so the default value is 0No, that is the value I set it to.The log tells me that both the ChildID == 0 and the ChildID == 1 parts of the scripts function properlyRegardsJames Quote Link to comment Share on other sites More sharing options...
james23222000 Posted November 20, 2008 Author Report Share Posted November 20, 2008 Anyone?? Quote Link to comment Share on other sites More sharing options...
pyrothijs Posted November 20, 2008 Report Share Posted November 20, 2008 (edited) Anyone??I'm a very bad scripter so I only checked punctuation and such. That all seams fine to me. Did found this:if(!p.IsValid() || !t.IsValid() || p.GetEnteredCarID() != -1) return false; I'm not sure if -1 is a valid value, but it's the only thing I could think of.greetz, Edited November 20, 2008 by pyrothijs Quote Link to comment Share on other sites More sharing options...
james23222000 Posted November 20, 2008 Author Report Share Posted November 20, 2008 I'm a very bad scripter so I only checked punctuation and such. That all seams fine to me. Did found this:[cod]if(!p.IsValid() || !t.IsValid() || p.GetEnteredCarID() != -1)return false;I'm not sure if -1 is a valid value, but it's the only thing I could think of.greetz,That is valid. If it wasn't, the script wouldn't work at all, but thanks anyway Still looking for helpRegardsJames Quote Link to comment Share on other sites More sharing options...
Commander Rasseru Posted November 21, 2008 Report Share Posted November 21, 2008 Would a "hold" command work? That will make person hold still by the dog? Quote Link to comment Share on other sites More sharing options...
soulbody Posted November 21, 2008 Report Share Posted November 21, 2008 Would a "hold" command work? That will make person hold still by the dog?maybe you can better make at solo commands, like attack civillian, search wounded, stop civilian. then you can find the bug by value and not by the hole script Quote Link to comment Share on other sites More sharing options...
james23222000 Posted November 22, 2008 Author Report Share Posted November 22, 2008 maybe you can better make at solo commands, like attack civillian, search wounded, stop civilian. then you can find the bug by value and not by the hole scriptThats how this script works. It only does part of the command at a time as if each childID is a single command script.Still need help.RegardsJames Quote Link to comment Share on other sites More sharing options...
soulbody Posted November 22, 2008 Report Share Posted November 22, 2008 Thats how this script works. It only does part of the command at a time as if each childID is a single command script.Still need help.RegardsJamesyou don't get the differentthe different is:childID: 1 command, and get more it CAN do5 commands: the k9 dog will do the thing you want. and the player set what not the script/game/dog Quote Link to comment Share on other sites More sharing options...
Commander Rasseru Posted November 25, 2008 Report Share Posted November 25, 2008 Have you try to do each command alone without any problems?I know you have to create a script for each command... But it let you know if the command works.Then slow add each command into one script...I hope that solve your problem? Quote Link to comment Share on other sites More sharing options...
james23222000 Posted November 25, 2008 Author Report Share Posted November 25, 2008 Unnfortunately its not quite as simple as that but I wil llook into it later.RegardsJames Quote Link to comment Share on other sites More sharing options...
Luisinho Posted January 21, 2009 Report Share Posted January 21, 2009 Sorry for posting on this old topic, but anywayz if you're still working on this, I guess I have an idea.Do you know Hoppah's Bomb Squad Robot? You can do the same as it, but instead of a robot, you can place a dog there, and instead of disarming bombs, you set it to attack people! Quote Link to comment Share on other sites More sharing options...
nick the greek Posted January 22, 2009 Report Share Posted January 22, 2009 as i said some weeks ago there is an animation for dog to attack people in rabid dog call. do you think you could use it? Quote Link to comment Share on other sites More sharing options...
james23222000 Posted January 23, 2009 Author Report Share Posted January 23, 2009 as i said some weeks ago there is an animation for dog to attack people in rabid dog call. do you think you could use it?I am using that, but there is a problem with the script that I haven't yet worked out. I am working on it though. Quote Link to comment Share on other sites More sharing options...
nick the greek Posted January 24, 2009 Report Share Posted January 24, 2009 ok good luck Quote Link to comment Share on other sites More sharing options...