OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: epsilonsun on 15 Nov 2008, 03:24:33
-
Hi there,
Im try to edit a script that smoke bomb can guide a holi land where it is.
but how to get the smoke's position?except throw it out,I know nothing about.
thanks alot! :D
-
in init.sqf
player addEventHandler ["Fired", {_this execVM "thrown.sqf"}];
thrown.sqf
_weapon = _this select 0;
if (_weapon == "Thrown") then
{
_shell = _this select 4;
waitUntil { (ceil(speed _shell))<=1};
_ShellPos = getPos _shell;
//Helo1 = the name of the helicopter you want to move to the position.
[[Helo1, _ShellPos]] execVM "helo_move.sqf";
};
helo_move.sqf
_helo = _this select 0;
_pos = _this select 1;
_helo doMove _pos;
waitUntil { ((_helo distance_pos) <= 6) };
_helo land "LAND";
Not sure if this will work correctly, but I think it should.
-
thanks a lot! i will try soon!