Jump to content

Recommended Posts

Afternoon all,

 

Short and sweet - I need a script or method of making the player seen as an ally when wearing a CSAT uniform but can be discovered if/when explosives are detonated or the player fires at anyone.

 

Many thanks in advance!

Share this post


Link to post
Share on other sites

uniform

if((typeOf (uniform player)) == "MyCSATClassname") then {hint " He's a SPY!";};


:shrug:

 

 

Share this post


Link to post
Share on other sites

You can't change the side of a unit while in game. Just make it setCaptive true, to be not shot:

player setCaptive true;

in init field of the player for example.

 

You can't (easily) pick up a foreign uniform while in game (uniform must belong to your side). But you can script something with the forceAddUniform command. So you need to define some circumstances... I can let you a script to pick up an enemy or civilian uniform on a dead corpse or on ground. I don't know why BI decided to "inhibit the habit", but let the choice for vehicles (it's easy to jump into any tank if unlocked, but try to jump into any uniform... you can't!)

 

So, let's say your player is wearing an enemy uniform, and is captive.

add this eventHandler:

EH_fired = player addEventHandler ["fired", {
  _plyr = _this select 0;
  if (captive _plyr) then {
   _plyr setCaptive false;
  _plyr removeEventHandler ["fired",EH_fired]
  }
}];

 

NB: this EH will run as soon as the player fires, places a charge or throws a grenade (before explosion).

 

Share this post


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

You can't change the side of a unit while in game.

Easily possible:

_grp = createGroup east;
[player] joinSilent _grp;
systemchat str side player; //east

_grp = createGroup independant;
[player] joinSilent _grp;
systemchat str side player; //independant

_enemysides = [side player] call BIS_fnc_enemySides;
_grp creategroup selectRandom _enemysides;
[player] joinSilent _grp;
systemchat str side player; //random enemy side

Cheers

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

×