Finding if a particular profiled unit is alive

  1. 5 months ago

    Hi guys, I'm making an operation where the players are looking for intel on a particular HVT, this person will have a random start and I'd like for him to be profiled so he takes part in the overall enemy opcoms plan. To identify this person I have a trigger that when he dies (!alive) a wallet spawns next to him with a hint saying id belongs to (insert name here).

    The problem is that if I profile him then kill him, the wallet doesn't spawn, I'm guessing this is because he is technically not alive until he actually spawns.

    Any way I can detect whether he is alive when he is profiled but not actually spawned?

  2. I had the same issue a while back, and I came to the conclusion it was just better not to profile them at all.

  3. Fair enough, maybe just the random spawn will have to do then!

  4. This is too funny, im at the exact same point in my project. Same issue and everything.

  5. I have a solution for you, if I dont post it by sunday please ping me.

  6. SpyderBlack723

    Feb 3 Moderator

    Here's a function for determining whether or not a profile exists (it will always exist if it's alive, and never exist if it's not).

    sb_fnc_profileExists = {
        private _profileID = _this;
        private _profile = [ALiVE_sysProfile,"getProfile", _profileID] call ALiVE_fnc_hashGet;
        !(isnil "_profile")

    You can determine the profileID using many ways. If you create the profile directly using one of our functions listed on the wiki then it will return either the profileID or the profile hash which can be used to grab the ID. You can also use our ALiVE_fnc_getNearProfiles directly on the man's position and give it a small radius so it only finds the desired profile.
    If you have the unit object after the unit has been profiled already, you can grab the ID of the profile he belongs to using

    private _unitObject = ...;
    private _profileID = _unitObject getvariable ["profileID", ""];
  7. SavageCDN

    Feb 4 Moderator

    added to wiki:

  8. Thanks guys!


or Sign Up to reply!