OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: terran4999 on 27 Dec 2008, 05:54:21
-
Hey
I am trying to make a hostage rescue mission but my hostages keep running away after i save the game and then load it. I tried "this disableAI "ANIM"" and "this setcaptive true" but they both loss affect after i load the saved game.
-
put this in the initialization of the hostage. Also, name the hostage myhostage.
m = [myhostage] execVM "hostageStay.sqf"
hostageStay.sqf
_unit = _this select 0;
_oldPos = getPos _unit;
while {alive _unit} do
{
_newPos = getPos _unit;
if (_newPos distance _oldPos >= 3) then
{
_unit setPos [getPos _oldPos select 0, getPos _oldPos select 1, getPos _oldPos select 2];
};
Sleep 1;
};