Jump to content
jmuirhead

[Tutorial] Zip Ties

Recommended Posts

1 hour ago, NotImpor7ant said:

Do you have the zip tie icon by any chance? If  not can you link me one?

I just posted the one I am currently using, just remember to change the config_vItems file as it does not use JPG.

Share this post


Link to post
Share on other sites

@GpGamingX

Yes! You have to add it to /Altis_Life.Altis/core/fn_setupActions.sqf they would have to be knocked out. 

You would add. 

life_actions = life_actions + [player addAction[localize "ZipTie",life_fnc_RestrainAction,"",0,false,false,"",'
        !isNull cursorObject && player distance cursorObject < 3.5 && isPlayer cursorObject && animationState cursorObject == "Incapacitated"']];

You would do something similar for escorting. Have it detect if they are restrained and then add the action to it. 

life_actions = life_actions + [player addAction[localize "Escort",life_fnc_escortAction,"",0,false,false,"",'
        !isNull cursorObject && player distance cursorObject < 3.5 && isPlayer cursorObject && animationState cursorObject == "Restrained"']];

You would do something similar to stop escorting someone.

if (player getVariable ["isEscorting",false]) then {
life_actions = life_actions + [player addAction[localize "Escort",life_fnc_stopEscort,"",0,false,false,"",'
        !isNull cursorObject && player distance cursorObject < 5 && isPlayer cursorObject && animationState cursorObject == "Restrained"']];
};

To be able to put someone into a vehicle it would be a bit weird but theres 2 ways. 1. You can only put them into the vehicle while they are escorting or while they are just restrained near the vehicle. I will doing 1.

Using the same code from above you.

if (player getVariable ["isEscorting",false]) then {
life_actions = life_actions + [player addAction[localize "Escort",life_fnc_stopEscort,"",0,false,false,"",'
        !isNull cursorObject && player distance cursorObject < 5 && isPlayer cursorObject && animationState cursorObject == "Restrained"']];
          
life_actions = life_actions + [player addAction[localize "Put in vehicle",life_fnc_putInCar,"",0,false,false,"",'
        !isNull cursorObject && player distance cursorObject < 5 && isPlayer cursorObject && animationState cursorObject == "Restrained"']];
};

As for pulling someone out of a vehicle i would stick to just the windows key.

 

Edited by jmuirhead

Share this post


Link to post
Share on other sites

Ok thanks! Is there a way to add so they can be restrained if they are knocked out and or surrender?(an or statement)

Edited by GpGamingX

Share this post


Link to post
Share on other sites
9 minutes ago, GpGamingX said:

Ok thanks! Is there a way to add so they can be restrained if they are knocked out and or surrender?

Yes right now it is setup so that if they are knocked out you can to add the check to see if they surrendered you need to change this part

&& animationState cursorObject == "Incapacitated"

 

to this

&& animationState cursorObject == "playerSurrender"

The whole part of this piece of code would look like

life_actions = life_actions + [player addAction[localize "ZipTie",life_fnc_RestrainAction,"",0,false,false,"",'
        !isNull cursorObject && player distance cursorObject < 3.5 && isPlayer cursorObject && animationState cursorObject == "playerSurrender" || animationState cursorObject == "Incapacitated"']];

 

 

 

Edited by jmuirhead

Share this post


Link to post
Share on other sites
15 hours ago, jmuirhead said:

Try replacing "side player" to "playerSide"

I have already tried that, with a bunch of other things. It definitely is not conflicting scripts because I have reversed the additions.

Share this post


Link to post
Share on other sites
On 9/22/2016 at 9:28 PM, NotImpor7ant said:

Do you have the zip tie icon by any chance? If  not can you link me one?

I just grabed a pic from the web, let me link you. 

Thats if the _unit is a police force then they cant get restrained

Share this post


Link to post
Share on other sites
12 minutes ago, RBXGames said:

When will you fix the Zip Ties script, the script right now is a piece of crap.

How about instead of criticising other go and make this script yourself?

Share this post


Link to post
Share on other sites
1 minute ago, Jason_000 said:

How about instead of criticising other go and make this script yourself?

I just don't like that you have to look all around I mean can the author like find all these problems and make a edit to there post so, the people that are wanting to use it don't have to look all around for the correct script.

Share this post


Link to post
Share on other sites

Like i just said, instead of looking around make it yourself, zipties are probably one of the easiest things to actually do since 100% of the code is already in the mission for you. Good luck.

Share this post


Link to post
Share on other sites

It seems like some people have had problems to get this working. Has the script been fixed now?

Edit nvm.

Edited by Felix

Share this post


Link to post
Share on other sites
6 hours ago, Felix said:

It seems like some people have had problems to get this working. Has the script been fixed now?

Edit nvm.

It should be working now. If you have any issues let me know.

Share this post


Link to post
Share on other sites

I followed the tutorial and triple checked but when i run the mission i get 

 Mission directory: mpmissions\__cur_mp.Altis\
Warning Message: Script core\civilian\fn_civInteractionMenu.sqf not found

not sure why

Share this post


Link to post
Share on other sites
3 hours ago, MrMallenby said:

I followed the tutorial and triple checked but when i run the mission i get 

 Mission directory: mpmissions\__cur_mp.Altis\
Warning Message: Script core\civilian\fn_civInteractionMenu.sqf not found

not sure why

Make sure you have

fn_civInteractionMenu.sqf

 

Inside 

core\civilian

Share this post


Link to post
Share on other sites
On 9/20/2016 at 10:49 PM, jmuirhead said:

5. Go to /core/civilian/ create a new file. Name it: fn_civInterationMenu.sqf

 

1 hour ago, MrMallenby said:

I do have that, thats why im so confused

In the instructions it says "create a new file. Name it: fn_civInterationMenu.sqf" is actually "fn_civInteractionMenu.sqf"

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×