Hello Skaven, long time no see
Start off with your hostages captives by using:
hostage setcaptive trueYou'll need a trigger that detects when the enemy are dead. In the on activation field put:
hostage setcaptive false; [hostage] join playerIf you have four hostages you can avoid typing this four times by first defining the hostages in an array (in your init file, or any init line),
hostages = [hostage1,hostage2,hostage3,hostage4]then using the following commands:
"_x setcaptive true" foreach hostages"_x setcaptive false" foreach hostageshostages join playerYou can add an element of realism by allowing the captors to kill the hostages if they feel sufficiently threatened. I did this in a rescue mission by placing a couple of guards (in safe or aware behaviour) by the hostages and using a small script like this:
;call script using [guardname] exec "guard.sqs"
_guard = _this select 0
#wait
;wait for the guard to become nervous
@ behaviour _guard == "combat"
;delay
~20
;check if the guard is still jittery
? behaviour _guard == "combat" : "_x setcaptive false" foreach hostages; exit
goto "wait"
Using a script like this makes hostage rescue much more difficult, and forces the player to plan the rescue rather than just barging in.
good luck