Home   Help Search Login Register  

Author Topic: Attaching markers to units  (Read 1724 times)

0 Members and 1 Guest are viewing this topic.

Jim666

  • Guest
Attaching markers to units
« 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

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Attaching markers to units
« Reply #1 on: 26 Jan 2005, 19:04:25 »
Make a loop and use the setMarkerPos command repeatedly. Once every 10 seconds should be enough.
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline rhysduk

  • Former Staff
  • ****
Re:Attaching markers to units
« Reply #2 on: 27 Jan 2005, 12:21:08 »
From a script i made:

Code: [Select]
#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
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Jim666

  • Guest
Re:Attaching markers to units
« Reply #3 on: 28 Jan 2005, 23:01:56 »
So if i want to add multiple units is just add them lines again or?

Offline rhysduk

  • Former Staff
  • ****
Re:Attaching markers to units
« Reply #4 on: 29 Jan 2005, 18:43:55 »
Yes all you need to do is add the three lines and change what i said.
Code: [Select]
#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
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Jim666

  • Guest
Re:Attaching markers to units
« Reply #5 on: 29 Jan 2005, 18:56:36 »
Thanks mate

Offline rhysduk

  • Former Staff
  • ****
Re:Attaching markers to units
« Reply #6 on: 29 Jan 2005, 18:57:16 »
No Problem.
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)