Jump to content
zagor64bz

Arrest==>Detain==>Escort script help.

Recommended Posts

Hi everyone...
I'm working on a SP WIP mini campaign, and and I try to iron out some things that bothers me.. I searched back and forth for a clean,simple "arrest ,detain and escort" script. I could use ACE3, but the mod list is already long enough. Basically, I have to arrest an HVT and extract him to base. Player has freedom on how to extract or which vehicle to use to accomplish the task. So far I have been using a script by cobra4v320 that work really well, but is unrealistic. It's the classic "unit surrender >arrest>join my squad". I highly doubt that an HVT will gladly follow you around, knowing that you will "interrogate" him and rotten in a jail for the rest of his life. What I really want is a script that will allow me to: get near the HVT,cursortarget him and have a "FREEZE" command (HVT will drop weapons and assume the surrender position); then a "you are under arrest" (HVT will assume the handcuff pose and be attach to player); then a "LOAD" and "UNLOAD" command to be able to transport HVT with ANY extraction vehicle(chopper,truck and what not...)
 
This is the scripts I'm using:

 

stop.sqf

///

/*
File: stop.sqf
Author: cobra4v320
*/

HVT = _this select 0;
_caller = _this select 1;
_id = _this select 2;

HVT removeAction _id;
[HVT] joinSilent grpNull; //removes officer from callers group

HVT playMove "AmovPercMstpSnonWnonDnon_AinvPknlMstpSnonWnonDnon"; //officer goes into kneeling animation

HVT disableai "ANIM";
HVT disableAI "MOVE";

if (alive HVT) then {
HVT addAction ["" + "STAY ON MY SIX, ARSHOLE" ,"follow.sqf", [], 1, true, false, "", "_target distance _this < 10 && side _this == blufor"];
}; 

 

capture.sqf

///

/*
File: capture.sqf
Author: cobra4v320
*/

HVT = _this select 0; //object the action is attached to
_caller = _this select 1; //caller of the action
_id = _this select 2; //the action ID

HVT removeAction _id; //remove action from officer
HVT setCaptive true; //set the officer to captive

detach HVT;
HVT enableAI "ANIM";
HVT switchMove "";

_rifle = primaryWeapon HVT; //get the officers primary weapon
if (_rifle != "") then {
HVT action ["dropWeapon", HVT, _rifle]; //drop weapon animation (doesn't actually remove the weapon)
waitUntil {animationState HVTr == "amovpercmstpsraswrfldnon_ainvpercmstpsraswrfldnon_putdown" || time > 3}; //waituntil drop weapon animation is complete
removeAllWeapons HVT; //remove all the officers weapons
};

_pistol = handgunWeapon HVTr; //get the officers primary weapon
if (_pistol != "") then {
HVT action ["dropWeapon", HVT, _pistol]; //drop weapon animation (doesn't actually remove the weapon)
waitUntil {animationState HVT == "amovpercmstpsraswrfldnon_ainvpercmstpsraswrfldnon_putdown" || time > 3}; //waituntil drop weapon animation is complete
removeAllWeapons HVT; //remove all the officers weapons
};

HVT action ["Surrender", HVT]; //play the surrender animation
HVT disableai "ANIM"; //disable animation so he doesnt move
HVT disableAI "MOVE"; //disable move so he doesnt run away

if (alive HVT) then {
HVT addAction ["" + "STAY ON MY SIX, HARSHOLE" ,"follow.sqf", [], 1, true, false, "", "_target distance _this < 10 && side _this == blufor"]; //add the follow me action to the officer
}; 

 

 

follow.sqf

///

/*
File: follow.sqf
Author: cobra4v320
*/

HVT = _this select 0;
_caller = _this select 1;
_id = _this select 2;

HVT removeAction _id;

HVT enableAI "ANIM";
HVT enableAI "MOVE";
HVT switchMove "";
[HVT] joinSilent _caller;

if (alive HVT) then {
HVT addAction ["" + "GET YOU ASS DOWN" ,"stop.sqf", [], 1, true, false, "", "_target distance _this < 10 && side _this == blufor"];
}; 

 

 

Thank you for the help!

Share this post


Link to post
Share on other sites
Guest

You can use attachTo like in AltisLife but it will not seems realistic as well.

Share this post


Link to post
Share on other sites

Really surprised know one has came out with dynamic animations for arresting some one. If they can do it with say carrrying a wounded why not a guy with his hands tied behind him?

  • Like 1

Share this post


Link to post
Share on other sites

You can use attachTo like in AltisLife but it will not seems realistic as well.

Yap..not realistic either..but at least the "escorted" will not be running around like a mad chicken..LOL.  

 

Really surprised know one has came out with dynamic animations for arresting some one. If they can do it with say carrying a wounded why not a guy with his hands tied behind him?

Was thinking the same... TBH, in RL HVT will be grabbed and escorted by at least 2 guys..if not more. But you did give me an idea: if only would be possible to knock out the HVT, then we could use the "carry the wounded unit" animation to transport him for a short distance and load him on a vehicle...mmmmm..anyone has any suggestion on that?

Share this post


Link to post
Share on other sites
Guest

Why not, why not. But If I remember well there are animations to push a guy in the campaign. If you are doing a mod you can always do animations yourself.

Share this post


Link to post
Share on other sites

Would be easy to do with addons > Hands behind back animation with upperTorso mask. Problem is now that you have to download something if you want to join the server.

Go through all the animations > check if you can move along the animation and i bet you find a solution that suits you.

 

\a3\anims_f\config\sdr\config.cpp > mask="upperTorso";

 

 

Edit: Do not use addActions on interacting functions. Why not? Misclicks will be fatal

  • Like 1

Share this post


Link to post
Share on other sites

Would be easy to do with addons > Hands behind back animation with upperTorso mask. Problem is now that you have to download something if you want to join the server.

Go through all the animations > check if you can move along the animation and i bet you find a solution that suits you.

 

\a3\anims_f\config\sdr\config.cpp > mask="upperTorso";

 

 

Edit: Do not use addActions on interacting functions. Why not? Misclicks will be fatal

That wouldn't be a problem..since the campaign is SP...

making the animations..that goes beyond my capabilities :(  :(  :(  

Share this post


Link to post
Share on other sites

That wouldn't be a problem..since the campaign is SP...

making the animations..that goes beyond my capabilities :(  :(  :(  

 

I can help at some point, maybe today if i have enough time. No need to create new ones, just little config editing.

  • Like 1

Share this post


Link to post
Share on other sites

I can help at some point, maybe today if i have enough time. No need to create new ones, just little config editing.

Check this video.....

 

script link

http://pastebin.com/Y4c5b9Zv

 

I'll be happy if from the surrender position I could zip tie the HVT and move him on my back and load it on a vehicle/unload him :P  :P  :P

Share this post


Link to post
Share on other sites

Check this video.....

 

script link

http://pastebin.com/Y4c5b9Zv

 

I'll be happy if from the surrender position I could zip tie the HVT and move him on my back and load it on a vehicle/unload him :P  :P  :P

 

Well seems like you have everything you need on that pastebin. Unfortunately i do not have enough time to make a completely new hostage funtion atm.

  • Like 1

Share this post


Link to post
Share on other sites

Well seems like you have everything you need on that pastebin. Unfortunately i do not have enough time to make a completely new hostage funtion atm.

I can extract SOME codes from that..but I'm afraid I cannot get all the functions that I need! I'm not good enough :(  

Share this post


Link to post
Share on other sites
Guest

Can you tell us precisely what is missing / needed.

Share this post


Link to post
Share on other sites

Can you tell us precisely what is missing / needed.

Thank you for replying!

First of all, that script check for an extraction zone, for task completion purposes, and I don't need that.Then it's missing the passage from "surrender" animation to "hands behind the back/arrest"  ones...and more important the load/unload to/from vehicles part. AND how to make all that work together. Did I mention that I'm a big donkey when is about scripts matters? :P  :P  :P

 

Bottom line: I need to approach the HVT, let assume he's already in the surrender position; an addaction/prompt to arrest him ==>carry/drop him==>load/unload to/from vehicles..not much,right? :D

 

PS:BIG CREDITS in the campaign will be the least....Thank you man!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×