Helmut_AUT 0 Posted March 4, 2008 Sorry for this most basic question, but I can't find it in any search here or at OFPEC. I have a group called hgroup intializing with "hgroup = group FTL1" where FTL1 is the primary player character in a mission for both single and multi player. Later in the mission, I want to attach a Harrier to this group, but chances are that FTL1 may be dead, player may have teamswitched or respawned in multi. So I can't "joinsilent FTL1", what I need is a short script to pick the first unit still alive from that hgroup. Alternatively, it would work if the radio trigger that attaches the Harrier would return the unit firing it, but this only seems to work reliable with "presence" type triggers. Thanks for your help. This will also be handy in other places. Share this post Link to post Share on other sites
Specter 0 Posted March 4, 2008 you could combine the radio and presence-trigger... like radio-trigger on activation: harrier = true present-trigger-condition: this && harrier i hope you know what i mean Share this post Link to post Share on other sites
Helmut_AUT 0 Posted March 4, 2008 Interesting work-around. Basically it would create a new array at the time of the radio message with only the currently "live" units in it. Share this post Link to post Share on other sites
Cloughy 0 Posted March 5, 2008 Just check if the leader of hgroup is alive. ie in the condition of the trigger, alive(leader hgroup) && whatever other condition then put your join silent in the activation field. Cheers GC Share this post Link to post Share on other sites
Helmut_AUT 0 Posted March 5, 2008 Thanks, but that doesn't solve my problem. I need to join the Harrier to the group, to put it under the command of whatever unit is currently leader in that group. If the primary leader is dead, I can not just "not" join the harrier in there, I need the next alive guy. Share this post Link to post Share on other sites
Pulverizer 1 Posted March 5, 2008 [harrier] joinSilent hgroup; Share this post Link to post Share on other sites
Helmut_AUT 0 Posted March 5, 2008 I think I tried that yesterday and failed with the message "must be object or group" and hgroup is an array. Maybe my mistake is defining hgroup as units FTL1 instead of groupFTL1...I have to look that up. Share this post Link to post Share on other sites