OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Jim666 on 26 Jan 2005, 16:46:55
-
Ive seen this been done before in a multiplayer map, well ALOT of multiplayer maps. I want a few markers to be attached to playbale units.
How would i got about doing this
-
Make a loop and use the setMarkerPos command repeatedly. Once every 10 seconds should be enough.
-
From a script i made:
#Loop
_unit = West_2; _mark = "West_2_Marker"
?(alive _unit): _mark setmarkerpos [getpos _unit select 0, getpos _unit select 1]
?(!alive _unit): _mark setmarkerpos [0,0]
Goto "Loop"
Let me explain what it does:
_unit = West_2 = West_2 is the name of the unit you want tracked.
_mark = "West_2_Marker" = Is the name of the marker you want attached to the unit.
Thats all you need to modify to get the script to follow a unit.
PM/Email me if you got questions.
Rhys
-
So if i want to add multiple units is just add them lines again or?
-
Yes all you need to do is add the three lines and change what i said.
#Loop
_unit = West_2; _mark = "West_2_Marker"
?(alive _unit): _mark setmarkerpos [getpos _unit select 0, getpos _unit select 1]
?(!alive _unit): _mark setmarkerpos [0,0]
_unit = West_1; _mark = "West_1_Marker"
?(alive_unit): _mark setmarkerpos [getpos _unit select 0, getpos _unit select 1]
?(!alive_unit): _mark setmarkerpos [0,0]
Goto "Loop"
Rhys
-
Thanks mate
-
No Problem.