OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: dmakatra on 25 Sep 2003, 21:51:22

Title: Seek Drop
Post by: dmakatra on 25 Sep 2003, 21:51:22
Yo! What's up m8s? I've this Q about this awsome drop command. Any help would be great:

OK. So I want this line of dust to start at a GL and then run right into a vehicle. The problem is, the vehicle's moving. So what I need is some kinda seek drop command that'll automaticly change "course" when the vehicle moves. Any help would be great.

:beat: *Gets Dropped* :beat:
Title: Re:Seek Drop
Post by: Grendel on 26 Sep 2003, 18:44:41
Hope this works, it isn't tested:

Code: [Select]
***I deleted the Obsolete Code, look below for tested version***
-Grendel
Title: Re:Seek Drop
Post by: Grendel on 26 Sep 2003, 19:12:49
Tested! ;D Enjoy!


Code: [Select]
;Grendels Drop Seeker Script V.9
;adjust these values to increase/decrease speed
_d=2
_i=.1

;use an invisible "H" named skr as _org
_org=skr

;target of seeker is _targ
_targ=target

#top
_dis = _org distance _targ

;you need this function and the intit.sqs line
_dir=[_org,_targ] call dirtoobj

_glpos =getpos _org
_gx=_glpos select 0
_gy=_glpos select 1

_mx=_gx+(_d*(sin(_dir)))
_my=_gy+(_d*(cos(_dir)))

_org setpos [_mx,_my]

drop ["cl_basic", "", "Billboard", 2, random(1)+1, [0,0, 0], [0, 0, 0], 0, 1.275, 1, 0, [random(5),random(1)+7],[[0.5,0.46,0.4,1],[0.5,0.46,0.4,0]],[0],0,0,"","",_org]

~_i
?_dis>2:goto "top"
exit
Title: Re:Seek Drop
Post by: dmakatra on 26 Sep 2003, 19:24:55
Cheers! :cheers:

:beat: *Gets Dropped* :beat: