Jump to content
Sign in to follow this  
Blockhead

Disguises and Identity Transferral

Recommended Posts

Hey im trying to make a mission where the players end up killing some people and taking there uniforms so they can infiltrate a base but I have encountered a few problems.

Problem #1 = Identity

On the wiki, it says identity is now transferred correctly in ArmA 2 but its not working in SP so I know it wont work in MP. This isnt a huge concern in terms of playability but it would still be nice.

Problem #2 = Script Execution

The mission is going to have 25 people in it, and I want them all to have the ability to 'Take off the disguise' and switch back to there original model but I dont know how to create a function or script that will work for all of them. The only other alternative I know of is to create 25 seperate SQF files.

Problem #3 = Weapon Transferral

I cannot figure out how to transfer someones entire inventory to the other unit.

Semi Problem #4 = Havent tested it out, but the mission is going to be using ACRE and wanted to know if this would be problem.

Here is all I have for switching players.

// fade to black

titleCut ["", "BLACK OUT", 2];

// wait a moment

sleep 2;

// teleport disguise to location of player

disguise1 setPos (getPos Unit_1);

// switch player

selectPlayer Disguise1;

Diguise1 setDamage (getDammage Unit_1);

// fade from black

titleCut ["", "BLACK IN", 2];

Unit_1 setPos (getMarkerPos "hideplace");

Switching back is pretty much the same thing only the units' places are reversed

---------- Post added at 01:14 AM ---------- Previous post was at 12:20 AM ----------

Tried doing the 25 SQF file, didnt work anyway.

this is how I did it

// fade to black

titleCut ["", "BLACK OUT", 2];

// wait a moment

sleep 2;

// teleport disguise to location of player

disguise1 setPos (getPos Unit_1);

disguise2 setPos (getPos Unit_2);

disguise3 setPos (getPos Unit_3);

disguise4 setPos (getPos Unit_4);

disguise5 setPos (getPos Unit_5);

disguise6 setPos (getPos Unit_6);

disguise7 setPos (getPos Unit_7);

disguise8 setPos (getPos Unit_8);

disguise9 setPos (getPos Unit_9);

disguise10 setPos (getPos Unit_10);

disguise11 setPos (getPos Unit_11);

disguise12 setPos (getPos Unit_12);

disguise13 setPos (getPos Unit_13);

disguise14 setPos (getPos Unit_14);

disguise15 setPos (getPos Unit_15);

disguise16 setPos (getPos Unit_16);

disguise17 setPos (getPos Unit_17);

disguise18 setPos (getPos Unit_18);

disguise19 setPos (getPos Unit_19);

disguise20 setPos (getPos Unit_20);

disguise21 setPos (getPos Unit_21);

disguise22 setPos (getPos Unit_22);

disguise23 setPos (getPos Unit_23);

disguise24 setPos (getPos Unit_24);

disguise25 setPos (getPos Unit_25);

// switch player

[unit_1] execVM "disguises\d1.sqf";

[unit_2] execVM "disguises\d2.sqf";

[unit_3] execVM "disguises\d3.sqf";

[unit_4] execVM "disguises\d4.sqf";

[unit_5] execVM "disguises\d5.sqf";

[unit_6] execVM "disguises\d6.sqf";

[unit_7] execVM "disguises\d7.sqf";

[unit_8] execVM "disguises\d8.sqf";

[unit_9] execVM "disguises\d9.sqf";

[unit_10] execVM "disguises\d10.sqf";

[unit_11] execVM "disguises\d11.sqf";

[unit_12] execVM "disguises\d12.sqf";

[unit_13] execVM "disguises\d13.sqf";

[unit_14] execVM "disguises\d14.sqf";

[unit_15] execVM "disguises\d15.sqf";

[unit_16] execVM "disguises\d16.sqf";

[unit_17] execVM "disguises\d17.sqf";

[unit_18] execVM "disguises\d18.sqf";

[unit_19] execVM "disguises\d19.sqf";

[unit_20] execVM "disguises\d20.sqf";

[unit_21] execVM "disguises\d21.sqf";

[unit_22] execVM "disguises\d22.sqf";

[unit_23] execVM "disguises\d23.sqf";

[unit_24] execVM "disguises\d24.sqf";

[unit_25] execVM "disguises\d25.sqf";

disguise1 setDamage (getDammage Unit_1);

disguise2 setDamage (getDammage Unit_2);

disguise3 setDamage (getDammage Unit_3);

disguise4 setDamage (getDammage Unit_4);

disguise5 setDamage (getDammage Unit_5);

disguise6 setDamage (getDammage Unit_6);

disguise7 setDamage (getDammage Unit_7);

disguise8 setDamage (getDammage Unit_8);

disguise9 setDamage (getDammage Unit_9);

disguise10 setDamage (getDammage Unit_10);

disguise11 setDamage (getDammage Unit_11);

disguise12 setDamage (getDammage Unit_12);

disguise13 setDamage (getDammage Unit_13);

disguise14 setDamage (getDammage Unit_14);

disguise15 setDamage (getDammage Unit_15);

disguise16 setDamage (getDammage Unit_16);

disguise17 setDamage (getDammage Unit_17);

disguise18 setDamage (getDammage Unit_18);

disguise19 setDamage (getDammage Unit_19);

disguise20 setDamage (getDammage Unit_20);

disguise21 setDamage (getDammage Unit_21);

disguise22 setDamage (getDammage Unit_22);

disguise23 setDamage (getDammage Unit_23);

disguise24 setDamage (getDammage Unit_24);

disguise25 setDamage (getDammage Unit_25);

Unit_1 setPos (getMarkerPos "hideplace");

Unit_2 setPos (getMarkerPos "hideplace");

Unit_3 setPos (getMarkerPos "hideplace");

Unit_4 setPos (getMarkerPos "hideplace");

Unit_5 setPos (getMarkerPos "hideplace");

Unit_6 setPos (getMarkerPos "hideplace");

Unit_7 setPos (getMarkerPos "hideplace");

Unit_8 setPos (getMarkerPos "hideplace");

Unit_9 setPos (getMarkerPos "hideplace");

Unit_10 setPos (getMarkerPos "hideplace");

Unit_11 setPos (getMarkerPos "hideplace");

Unit_12 setPos (getMarkerPos "hideplace");

Unit_13 setPos (getMarkerPos "hideplace");

Unit_14 setPos (getMarkerPos "hideplace");

Unit_15 setPos (getMarkerPos "hideplace");

Unit_16 setPos (getMarkerPos "hideplace");

Unit_17 setPos (getMarkerPos "hideplace");

Unit_18 setPos (getMarkerPos "hideplace");

Unit_19 setPos (getMarkerPos "hideplace");

Unit_20 setPos (getMarkerPos "hideplace");

Unit_21 setPos (getMarkerPos "hideplace");

Unit_22 setPos (getMarkerPos "hideplace");

Unit_23 setPos (getMarkerPos "hideplace");

Unit_24 setPos (getMarkerPos "hideplace");

Unit_25 setPos (getMarkerPos "hideplace");

// fade from black

titleCut ["", "BLACK IN", 2];

and all of the seperate d.sqf files looked like this only with different disguise number.

selectPlayer Disguise1;

Sorry im pretty bad at locality and all that jazz(and scripting in general:p).. when I previewed it I jumped into every single units body.. how do I make it so each script would be executed only on that unit's player's machine?

Share this post


Link to post
Share on other sites
Hey im trying to make a mission where the players end up killing some people and taking there uniforms so they can infiltrate a base but I have encountered a few problems.

Problem #1 = Identity

On the wiki, it says identity is now transferred correctly in ArmA 2 but its not working in SP so I know it wont work in MP. This isnt a huge concern in terms of playability but it would still be nice.

Problem #2 = Script Execution

The mission is going to have 25 people in it, and I want them all to have the ability to 'Take off the disguise' and switch back to there original model but I dont know how to create a function or script that will work for all of them. The only other alternative I know of is to create 25 seperate SQF files.

Problem #3 = Weapon Transferral

I cannot figure out how to transfer someones entire inventory to the other unit.

Semi Problem #4 = Havent tested it out, but the mission is going to be using ACRE and wanted to know if this would be problem.

Aww man, you are threading on a rough road now, i wish you all the best in this project.

1: identity will not work correctly in SP, but will do so in MP, simply test in MP editor to see it work.

2: as i understand it you have the "disquise unit" already placed in editor(else you neeed to create it), so try this for using 1 script for all players:

_null = [playerUnit_Name,switchToUnit_Name] execVM "scriptname.sqf";

here is the script used, also only executing on the player so your last question should be solved.:

// scriptname.sqf
_unit = _this select 0;
_newUnit = _this select 1;

if (_unit == player) then {
// fade to black
titleCut ["", "BLACK OUT", 2];

// wait a moment
sleep 2;

// teleport disguise to location of player
_newUnit setPos (getPos _unit);

// switch player
selectPlayer _newUnit;
_newUnit setDamage (getDammage _unit);

// fade from black
titleCut ["", "BLACK IN", 2];

_unit setPos (getMarkerPos "hideplace");

/////////////////////////////////////////////////////////////////////////////////////////////
// this is the weapon transfer part, just quick and dirty, not caring for ACE or backpacks.//
/////////////////////////////////////////////////////////////////////////////////////////////

// collecting amount and type of equipment player had before switch.
_weapons = weapons _unit;
_magazines = magazines _unit;

// removing all weapons from new unit.
removeAllWeapons _newUnit;
{if (_newUnit hasWeapon _x) then {_newUnit removeWeapon _x}} foreach (weapons _newUnit;

// here we add all the magazines and weapons of the previous unit, not that all magazines will be full.
{_newUnit addMagazine _x} foreach _magazines;
{_newUnit addWeapon _x} foreach _weapons;
};

3: look in tscript above for weapon transfer, for more advanced unit transfer including ACE or backpacks, look in my sig in my preset loadouts script.

4: no problem with ACRE, since ACRE updates itself pretty fast, but you need to either add backpacks compatibility and ACE is not the same as vanilla when it comes to weapons.

Share this post


Link to post
Share on other sites
1: identity will not work correctly in SP, but will do so in MP, simply test in MP editor to see it work.

Have you been doing an all nighter for TKOH too? I assume you mean the exact opposite? :p Or am I reading this with my face crossed? :D

Share this post


Link to post
Share on other sites
Have you been doing an all nighter for TKOH too? I assume you mean the exact opposite? :p Or am I reading this with my face crossed? :D

lol not sure what TKOH is, when i tried using selectplayer in SP and used sidechat commands, my identity was the one of the new unit, not my nick as normal.

when i tried in MP editor, it all worked fine.

i did not think he meant setIdentity.. i asumed he meant playerNick.

maybe i misunderstood the question.?

else your face is x´d :)

edit: here is my previous SP selectPlayer identity issue in more detail.

http://forums.bistudio.com/showpost.php?p=1893886&postcount=2

edit: just realised there was a public beta of TOH :D downloading now.

Edited by Demonized

Share this post


Link to post
Share on other sites

I'll check it out tomorrow. Just working with identities myself atm. Now... Zzzzzzzz..... :)

...

Ahh, now I see. Well in SP I don't care much for player nick, I prefer playing a role - somebody else. And with somebody else you can use setIdentity to set a premade identity to any unit you want. And this is what works great for me.

I guess for this to work with player nick (profile setup), a special identity should have to be recognized, "player" or "profile" that doesn't set anything and use that. So that i.e. player setIdentity profileid would work, where profileid is this new recognized magic parameter. Sorry to bring up false hope :p

Edited by CarlGustaffa

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
Sign in to follow this  

×