OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: OFPWiZard on 11 Feb 2005, 18:15:07
-
Name says it all...
I would like to know how i could create a marker (Dot) to follow an enemy if your person is within a distance of 200.
It would have multiple enemies in which the Dots would be created.
So it would be triggered on every enemy in a certain poistion (after you call for statellite intelligence)... so the script would like like
--------------------------------
? ((_unit distance =< 200) _enemies)) : goTo begin
? ((_unit distance > 200) _enemies)) : goTo over
#begin
getMarkerPos _markerFULL \\ A marker that is visiable, maybe Red
_marker setPos getPos _enemies... etc.
? ((_unit distance =< 200) _enemies)) : goTo begin
? ((_unit distance > 200) _enemies)) : goTo over
#over
getMarkerPos _markerEmepty \\ A marker that isn't visiable
_marker setPos getPos _enemies
goTo begin
--------------------------------
It might be a lot more complex but i would like to know if it is possible.
Please and thank you if you can help.
-
Use a script like u made, then use a trigger which launches it on activation. Set it east/west present, repeatedly, etc. That should make it work.
-
setPos doea not work with markers, you need to use setMarkerPos.
Here is a n extract from a script I am using to de-bug a mission at the moment. It enables me to follow all the groups on the map
#loop
.
.
.
.
"ei0" setMarkerPos getpos (leader e_Infantry_0Grp)
"ei1" setMarkerPos getpos (leader e_Infantry_1Grp)
.
.
.
~2
goto"loop"
-
Yeah, you can only use editor defined markers as far as I know. The thoght of using a Rsc popped into my head for a second but you can't set it's pos on the map.
*edit* only global strings can be used for markersa I've found too :'(