Aiming

ihatetn931

Well-Known Member
How do you detect if a person is aiming at a zombie or a player?

Like if i aim at a player i want a addaction menu to pop up, same with a zombie

And will someone be kind enough to explain what these do and what the "0" means

Code:
_leader = _this select 0;

I looked up the select and i know it's doing somthing with the variable but i can't figure out what the "0" does
 
You would use cursorTarget to get the info about what they are looking at. Something like.

Private ["_cursorTarget"];
_cursorTarget = cursorTarget;

if (_cursorTarget is kindOf "ZombieBase") then {
You are looking at a zombie code
};
 
About the leader thing, it is an array.

_fruit = ["apple","pair","orange"];

_apple = _fruit select 0;
_pair = _fruit select 1;
_orange = _fruit select 2;
 
Back
Top