Jump to content
Ilias38rus

Determine is unit a medic | engineer , determining , checking .

Recommended Posts

I think there are only three types of medic : "B_medic_F"   "B_recon_medic_F"   "B_G_medic_F"

if ( (typeOf player == "B_medic_F") or (typeOf player == "B_recon_medic_F") or (typeOf == "B_G_medic_F") )
  then {hint "I'm a medic"}
  else {hint "I'm not a medic"};

Share this post


Link to post
Share on other sites

 

I think there are only three types of medic : "B_medic_F"   "B_recon_medic_F"   "B_G_medic_F"

if ( (typeOf player == "B_medic_F") or (typeOf player == "B_recon_medic_F") or (typeOf == "B_G_medic_F") )
  then {hint "I'm a medic"}
  else {hint "I'm not a medic"};

thanks, but know it

'`If using mods?

should be some way to determine the abbilitiies

Share this post


Link to post
Share on other sites

Look up the classnames of the medic for the mods you use.

Share this post


Link to post
Share on other sites

If their using the standard BI way then..

isMedic = getNumber ( configFile >> "CfgVehicles" >> typeOf _unit >> "attendant" ) isEqualTo 1;
isEngineer = getNumber ( configFile >> "CfgVehicles" >> typeOf _unit >> "engineer" ) isEqualTo 1;
Although this is potential incorrect if you are using some non standard medical/enginnering mod, but this is what as standard denotes whether a unit can do medical/engineer tasks.

Share this post


Link to post
Share on other sites

If their using the standard BI way then..

isMedic = getNumber ( configFile >> "CfgVehicles" >> typeOf _unit >> "attendant" ) isEqualTo 1;
isEngineer = getNumber ( configFile >> "CfgVehicles" >> typeOf _unit >> "engineer" ) isEqualTo 1;
Although this is potential incorrect if you are using some non standard medical/enginnering mod, but this is what as standard denotes whether a unit can do medical/engineer tasks.

 

Thank you

Share this post


Link to post
Share on other sites

Trying to make a pilot restriction script which works in the same way

 

My problem is that if I type 'typeOf player == "B_pilot_F";' into the debug console, it says 'false'.

I am "B_soldier_F" it says.

 

I placed "B_soldier_F" with the editor, but I am using the "new" respawn system where you can choose the class and respawn location while respawning. 

 

(Example picture of the system from this forum)

 

CfcfpeWWEAEXsfU.jpg:large

 

Anyone has ideas?

Thank you.

 

Share this post


Link to post
Share on other sites
On 17/01/2016 at 5:01 PM, Larrow said:

If their using the standard BI way then..

 


isMedic = getNumber ( configFile >> "CfgVehicles" >> typeOf _unit >> "attendant" ) isEqualTo 1;
isEngineer = getNumber ( configFile >> "CfgVehicles" >> typeOf _unit >> "engineer" ) isEqualTo 1;

Although this is potential incorrect if you are using some non standard medical/enginnering mod, but this is what as standard denotes whether a unit can do medical/engineer tasks.

https://community.bistudio.com/wiki/getUnitTrait

  • Like 2

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

×