To find the answer to your question, use the search or choose a category to read the related questions.
Change Clothes Example
|
This example was created for ArmaHolic by DarkXess.
It is to show how simple "Script Snippets" are easy to set up for missions makers
by using and showing in the example form in which it was created.
How to use "Change Clothes Example"
Ok very simple! just set up two scripts like these below.
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;
Place 2 units on the map, one a sniper and one a rifleman like in my example! (change them if you like)
Name the sniper "sni" and the rifleman "rf" and thats it, done.
Now preview and see it work.
Change Clothes Example |
Updated: Sunday 10th of June 2012 10:05 AM, Asked By: DarkXess, viewed 10215 times
|
|