OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: UK_SKA_RULES on 04 Sep 2002, 01:20:00
-
Okay, what I want to do is I need markers follow groups around on the map.. So I know where all the groups are, and the marker stays untill the last person in the groupd dies.. Anyone know how to do this?
-
Simplest way, make a script and exec it from a trigger, init or WP. In the script put;
"MarkerName" SetMarkerPos (Getpos Leader GroupName)
I think that might work.
-
yeah that kind of works.. The marker shows on the map in the position of the unit, but I need that marker to follow them around on the battlefield, and it keeps following them untill the entire squad is dead
-
You keep having to refresh the command so it keeps following them. If you loop the script then this will do that.
#loop
"MarkerName" SetMarkerPos (Getpos Leader GroupName)
~1
goto "loop"
This will loop it every second. So the marker will move itself to the new group position every second.
As for "until they're dead". This line should work until all of them remain and it will show the position of the leader (which will change when the leader is killed). You can then set a trigger that detects if all the group are dead using the alive command I think.
When they are dead use
"markername" setmarkertype "EMPTY" and the marker will disappear. You could also use the same trigger to stop looping the script
-
Darn I knew I forgot something, the actual loop part lol.