Jump to content
Sign in to follow this  
Pundaria

Check if someone has something?

Recommended Posts

How to set the code to check if the player has a certain object?

(like that in PMC, recovering the evidence from the doctor)

How to attach a trigger and marker to an object?

Share this post


Link to post
Share on other sites

_hasEv = player hasWeapon "Kostey_notebook";

if (_hasEv) then {
    hint "Player has the notebook!";
} else {
    hint "Player does not have the notebook!";
};

First name the trigger in it's name field, something like sally. Then to attach it to something called harry:

sally attachTo [harry,[0,0,0]];

To track with a marker, pre-place a marker called mkr_harry somewhere then in your init.sqf put:

[] spawn {
 while {not isnull harry} do { "mkr_harry" setmarkerpos getpos harry; sleep 0.5; };
};

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  

×