Home   Help Search Login Register  

Author Topic: How to use smoke to guide a chopper landing?  (Read 1253 times)

0 Members and 1 Guest are viewing this topic.

Offline epsilonsun

  • Members
  • *
How to use smoke to guide a chopper landing?
« 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

Offline ModestNovice

  • Members
  • *
Re: How to use smoke to guide a chopper landing?
« Reply #1 on: 15 Nov 2008, 18:04:56 »
in init.sqf

Code: [Select]
player addEventHandler ["Fired", {_this execVM "thrown.sqf"}];
thrown.sqf
Code: [Select]
_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
Code: [Select]
_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.
« Last Edit: 15 Nov 2008, 18:06:37 by DaChevs »
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley

Offline epsilonsun

  • Members
  • *
Re: How to use smoke to guide a chopper landing?
« Reply #2 on: 16 Nov 2008, 07:29:43 »
thanks a lot! i will try soon!