OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: ilangut on 04 Feb 2003, 17:32:32

Title: marking a landing spot using smoke granade
Post by: ilangut on 04 Feb 2003, 17:32:32
Dear Forum Members

Does anybody have an idea how i can
make a heli land in a spot indicated by a smoke granade?
Title: Re:marking a landing spot using smoke granade
Post by: O Neil on 05 Feb 2003, 08:35:17
You can get a guy to chuck a smoke nade where he is going to land. But I don't think.....hold on, what would be the cam create forsmoke nade ?:

flare1="smoke" camcreate[getpos dude select 0, getpos dude select 1,50]?

Still, if you did that, you would have to know where the heli is going to land before hand.

O Neil ;)
Title: Re:marking a landing spot using smoke granade
Post by: ilangut on 05 Feb 2003, 11:47:25
Hmmm, that's nice but, Not quite what i Had planed.
Can I somehow get the Coordinates for an object i throw?

 ???
Title: Re:marking a landing spot using smoke granade
Post by: Kaliyuga on 05 Feb 2003, 22:00:26
 Why not get the position of the man that threw the smoke .. and not the smokeshell it's self.... it's gonna be close enough anyways right? and we all know that choppers kinda pick and choose their landing zones anyways right?
::)  
so as soon as the smokeshell is thrown... or camcreated.....  the chopper gets the position of the guy who threw it and goes there to pick him up.....

all you have to do is name the guy .. or group instead of trying to figure it out the other way...
:cheers:
Title: Re:marking a landing spot using smoke granade
Post by: Knight_Sky on 05 Feb 2003, 23:44:07
Check through the scripts, i have played a mission where the chopper lands directly on a red smoke flare. So its definately possible, ill look into it.
Cheers
KS
Title: Re:marking a landing spot using smoke granade
Post by: Liquid_Silence on 06 Feb 2003, 01:33:22
(Following needs resistance)


player addEventHandler ["Fired", {_this exec "fired.sqs"}]

fired.sqs:
Code: [Select]
_ammo = _this select 4
_smoke_types = ["SmokeShell","SmokeShellRed","SmokeShellGreen"]
if !(_ammo in _smoke_types) then {goto "end"}
_shell = nearestObject [player, _ammo]

_pos = [0,0,0]

#loop
_last_pos = _pos
_pos = getPos _shell
~0.1
if !(_last_pos == _pos) then {goto "loop"}


heli doMove _pos

;landing code here

#end


This might work :)
Title: Re:marking a landing spot using smoke granade
Post by: ilangut on 06 Feb 2003, 10:15:19
Great!

Seems Like Everything's possible these days.

Thanx alot guys...  ::)