Forum Jump :

Author Message

DarkXess  

Modsaholic Founder


Posts: 2742
Rank:


Country: cn
Location: Changchun
Occupation: Engineer
Age: 33
In-game name: DarkXess

 
#1 Posted at 2011-01-18 18:43        
     
Here is a script allowing you to change clothes, from sniper to rifleman vice versa.
You can change it to any other unit you wish, so "woodland sniper" to "desert sniper" etc ..

This is not my script! I found it on the BIS Forums and noticed nobody had made a demo
mission for others to see how it works! also it is not released anywhere.
I have seen a few posts on how to change environment clothing etc .. So im sure this will help
some of you guys wanting it for your missions.

Credits go to WoodyUK on the BIS forums for the script, and me for converting it into a demo mission
and releasing it on here.

Demo mission includes 1 "init.sqf" and 1 "UniSwitch.sqf" for this to work.

Init.sqf:

private ["_uniform"];
_uniform = rf addAction ["Change Uniform", "UniSwitch.sqf"];
_uniform = sni addAction ["Change Uniform", "UniSwitch.sqf"]; 

enableTeamSwitch false;

UniSwitch.sqf:

private ["_snipos","_rfmpos","_dir","_group"];
_snipos = getPos sni;
_rfmpos = getPos rf;
_dir = getDir player;
_group = group player;

titleText ["Changing Clothes", "BLACK OUT", 2];
sleep 2;
sni setPos _rfmpos;
rf setPos _snipos;

if (player == rf) then 
{
     [rf] join grpNull;
     selectPlayer sni;
     [sni] joinSilent _group;
} else
{
     [sni] join grpNull;
     selectPlayer rf;
     [rf] joinSilent _group;
};
sleep 1;
titleText ["Changing Clothes", "BLACK IN", 2];
player setDir _dir;
exit;

DownLoad Here!

This post was edited by DarkXess (2011-02-08 18:10, ago)

1st - Check The Rules! 2nd - Use The Search!


Author Message

VIPER[CWW]  

I'm a stable whore


Posts: 2127
Rank:


Level: Former Staff

Country: en
Location:
Occupation:
Age: 25
In-game name: VIPER [RR]

 
#2 Posted at 2011-01-18 20:24        
     
Looks like something Pirin made for someone in need of this kind of script, the script in question was a Spec Ops Soldier Jumps out of a Lada and runs into a compound....Blacks out, then he emerges from a house in his TakiClothes as Mr.Undercover himself :D

Nice script though, could be used in one of my future missions :) Sniper is in the bush, kills the HVT and the changes his clothes to that of the EuroMan1 and voila escapes the country :-D


Advertisement


Author Message


Posts: 5
Rank:


Level: Member

Country: pl
Location:
Occupation:
Age: 24
In-game name: polikerski

 
#3 Posted at 2012-07-30 16:56        
     
I have a question for this mod. How can I change my uniform from ex. Assault Grenadier (Scout) to sniper? What must I change?

My PC:
AMD Phenom II X4 955BE 3.2GHz
Sapphire Radeon HD 6870 DDR5 1GB
8GB GoodRam DDR2 800MHz
Gigabyte GA-M720-US3
Chieftec GPA-500S
Seagate Barracuda ST3750528AS AT

Author Message

W0lle  

call me evil


Posts: 1802
Rank:


Country: de
Location:
Occupation: CWR² Developer
Age: 98
In-game name: CWR2 PR

 
#4 Posted at 2012-07-30 17:15        
     
As I see it, just the units on the map called "sni" and "rf".


Author Message


Posts: 5
Rank:


Level: Member

Country: pl
Location:
Occupation:
Age: 24
In-game name: polikerski

 
#5 Posted at 2012-07-30 19:15        
     
But what if i want to do it in multiplayer? And what if i don't want to change weapons?

This post was edited by polikerski (2012-07-30 19:21, 848 days ago)

My PC:
AMD Phenom II X4 955BE 3.2GHz
Sapphire Radeon HD 6870 DDR5 1GB
8GB GoodRam DDR2 800MHz
Gigabyte GA-M720-US3
Chieftec GPA-500S
Seagate Barracuda ST3750528AS AT

Author Message

DarkXess  

Modsaholic Founder


Posts: 2742
Rank:


Country: cn
Location: Changchun
Occupation: Engineer
Age: 33
In-game name: DarkXess

 
#6 Posted at 2012-07-31 00:23        
     
You can build on this script so that it would change the clothes of any person to another person with
different clothes AND carry over the same weapons also. Like W0lle said anyone unit named "sni" and "rf"
can be changed - OR you can re-edit the script and change the names how you want. :-)

1st - Check The Rules! 2nd - Use The Search!


Author Message


Posts: 5
Rank:


Level: Member

Country: pl
Location:
Occupation:
Age: 24
In-game name: polikerski

 
#7 Posted at 2012-07-31 09:07        
     
Now, what I did is i copied whole UniSwitch 4 times (so that i can change clothes in 4 playable units, right?) and there where is "rf" i changed it to a,b,c and d (that's the units i will play with. I placed 4 snipers and named them sni,sni1,sni2,sni3 and changed them in uniswitch. Also i did the same for init, copied 4 times and changed all "rf" and "sni". But when i start the mission, i click change clothes, and the screen blacks out, my whole squad is in place of snipers and vice-versa. I don't know if I did something wrong or this just doesn't work in multi?

Init:
private ["_uniform"];
_uniform = a addAction ["Change Uniform", "UniSwitch.sqf"];
_uniform = sni addAction ["Change Uniform", "UniSwitch.sqf"]; 

enableTeamSwitch false;

private ["_uniform"];
_uniform = b addAction ["Change Uniform", "UniSwitch.sqf"];
_uniform = sni1 addAction ["Change Uniform", "UniSwitch.sqf"]; 

enableTeamSwitch false;

private ["_uniform"];
_uniform = c addAction ["Change Uniform", "UniSwitch.sqf"];
_uniform = sni2 addAction ["Change Uniform", "UniSwitch.sqf"]; 

enableTeamSwitch false;

private ["_uniform"];
_uniform = d addAction ["Change Uniform", "UniSwitch.sqf"];
_uniform = sni3 addAction ["Change Uniform", "UniSwitch.sqf"]; 

enableTeamSwitch false;

UniSwitch:
private ["_snipos","_ampos","_dir","_group"];
_snipos = getPos sni;
_ampos = getPos a;
_dir = getDir player;
_group = group player;

titleText ["Changing Clothes", "BLACK OUT", 2];
sleep 2;
sni setPos _ampos;
a setPos _snipos;

if (player == a) then 
{
     [a] join grpNull;
     selectPlayer sni;
     [sni] joinSilent _group;
} else
{
     [sni] join grpNull;
     selectPlayer a;
     [a] joinSilent _group;
};
sleep 1;
titleText ["Changing Clothes", "BLACK IN", 2];
player setDir _dir;
exit;

private ["_sni1pos","_bmpos","_dir","_group"];
_sni1pos = getPos sni1;
_bmpos = getPos b;
_dir = getDir player;
_group = group player;

titleText ["Changing Clothes", "BLACK OUT", 2];
sleep 2;
sni1 setPos _bmpos;
b setPos _sni1pos;

if (player == b) then 
{
     [b] join grpNull;
     selectPlayer sni1;
     [sni1] joinSilent _group;
} else
{
     [sni1] join grpNull;
     selectPlayer b;
     [b] joinSilent _group;
};
sleep 1;
titleText ["Changing Clothes", "BLACK IN", 2];
player setDir _dir;
exit;

private ["_sni2pos","_cmpos","_dir","_group"];
_sni2pos = getPos sni2;
_cmpos = getPos c;
_dir = getDir player;
_group = group player;

titleText ["Changing Clothes", "BLACK OUT", 2];
sleep 2;
sni2 setPos _cmpos;
c setPos _sni2pos;

if (player == c) then 
{
     [c] join grpNull;
     selectPlayer sni;
     [sni2] joinSilent _group;
} else
{
     [sni2] join grpNull;
     selectPlayer rf;
     [c] joinSilent _group;
};
sleep 1;
titleText ["Changing Clothes", "BLACK IN", 2];
player setDir _dir;
exit;

private ["_sni3pos","_dmpos","_dir","_group"];
_sni3pos = getPos sni3;
_dmpos = getPos d;
_dir = getDir player;
_group = group player;

titleText ["Changing Clothes", "BLACK OUT", 2];
sleep 2;
sni3 setPos _dmpos;
d setPos _sni3pos;

if (player == d) then 
{
     [d] join grpNull;
     selectPlayer sni3;
     [sni3] joinSilent _group;
} else
{
     [sni3] join grpNull;
     selectPlayer d;
     [d] joinSilent _group;
};
sleep 1;
titleText ["Changing Clothes", "BLACK IN", 2];
player setDir _dir;
exit;

My PC:
AMD Phenom II X4 955BE 3.2GHz
Sapphire Radeon HD 6870 DDR5 1GB
8GB GoodRam DDR2 800MHz
Gigabyte GA-M720-US3
Chieftec GPA-500S
Seagate Barracuda ST3750528AS AT

Author Message

VIPER[CWW]  

I'm a stable whore


Posts: 2127
Rank:


Level: Former Staff

Country: en
Location:
Occupation:
Age: 25
In-game name: VIPER [RR]

 
#8 Posted at 2012-08-01 10:43        
     
That's how the script works, it doesn't change the clothes of your unit but completely switches it to another unit standing by in another position, blackout is part if the script if you read the seventh line. ;-)


Author Message


Posts: 109
Rank:


Level: Member

Country: uk
Location: Suffolk
Occupation: Service Desk Team leader
Age: 53
In-game name: ninja_prime

 
#9 Posted at 2012-08-19 06:46        
     
Great script BTW, but isn't this ability to change clothes going to be available in ARMA 3?


Author Message

Pirin  



Posts: 1545
Rank:


Level: Member PFS

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 40
In-game name: kylania

 
#10 Posted at 2012-08-19 08:01        
     
# Ninja_Prime : Great script BTW, but isn't this ability to change clothes going to be available in ARMA 3?

Kinda, but it's use in multiplayer has been scrapped. So no. It's all about locality and how ignoring it makes it go away! :)


Author Message


Posts: 109
Rank:


Level: Member

Country: uk
Location: Suffolk
Occupation: Service Desk Team leader
Age: 53
In-game name: ninja_prime

 
#11 Posted at 2012-08-19 09:52        
     
# Pirin : Kinda, but it's use in multiplayer has been scrapped. So no. It's all about locality and how ignoring it makes it go away! :)
LOL..