Home   Help Search Login Register  

Author Topic: Make a Marker follow a unit  (Read 642 times)

0 Members and 1 Guest are viewing this topic.

TH

  • Guest
Make a Marker follow a unit
« on: 16 Jun 2004, 02:20:46 »
Hi, i tried de-pbo'ing serial killer but its in german :-\ how do I make a marker appear on top of a unit when it is spotted and follow the unit

j-man

  • Guest
Re:Make a Marker follow a unit
« Reply #1 on: 16 Jun 2004, 04:17:58 »
Code: [Select]
#loop
?(player knowsabout XXX > 1) : goto "mark"
~0.5
goto "loop"

#mark
"marker" setMarkerpos getpos XXX
~0.5
goto "mark"

Remember to replace XXX with the name of the target that you want to the marker to follow.

TH

  • Guest
Re:Make a Marker follow a unit
« Reply #2 on: 16 Jun 2004, 05:21:39 »
ok, let me be more specific, i want 5 resistance soldiers to have a marker follow them if spotted by any of 10 east soldiers, will this script still work for that?

j-man

  • Guest
Re:Make a Marker follow a unit
« Reply #3 on: 16 Jun 2004, 05:38:46 »
this script will only detect if the player has detected one specified person. I'm not sure how to make what you want without making the script incredablely long. Mabey someone else can figure things out.

TH

  • Guest
Re:Make a Marker follow a unit
« Reply #4 on: 16 Jun 2004, 06:28:37 »
then make it incredibly long :P

ponq

  • Guest
Re:Make a Marker follow a unit
« Reply #5 on: 16 Jun 2004, 09:35:34 »
enter this word in the quicksearch at the editors depot "Tracking".

The group trackingscript maybe what you are looking for.

TH

  • Guest
Re:Make a Marker follow a unit
« Reply #6 on: 16 Jun 2004, 18:54:53 »
ive found it but i cant get it to work, my group name is g i want it so if any east player spots a resistance player the leader of g is marked. can anyone help?

Offline surpher

  • Members
  • *
Re:Make a Marker follow a unit
« Reply #7 on: 16 Jun 2004, 22:15:23 »
This should help you TH

Just one of my scripts I've edited for you so it does a little more than you need. Let us know if it's what you need.

TH

  • Guest
Re:Make a Marker follow a unit
« Reply #8 on: 17 Jun 2004, 03:47:10 »
er, i tried it and everything works... exept the markers dont go to them... this is what i have
_deadMarkerType = _this select 0
_deadMarkerSize = _this select 1
_detectedByGroup = _this select 2
~2
#track
; check if player dead
?!(alive pl1): "pl1M" Setmarkertype _deadMarkerType && "pl1M" setmarkercolor "ColorRed" &&  "pl1M" setMarkerSize _deadMarkerSize
?!(alive pl2): "pl2M" Setmarkertype _deadMarkerType && "pl2M" setmarkercolor "ColorRed" &&  "pl2M" setMarkerSize _deadMarkerSize
?!(alive pl3): "pl3M" Setmarkertype _deadMarkerType && "pl3M" setmarkercolor "ColorRed" &&  "pl3M" setMarkerSize _deadMarkerSize
?!(alive pl4): "pl4M" Setmarkertype _deadMarkerType && "pl4M" setmarkercolor "ColorRed" &&  "pl4M" setMarkerSize _deadMarkerSize
?!(alive pl5): "pl5M" Setmarkertype _deadMarkerType && "pl5M" setmarkercolor "ColorRed" &&  "pl5M" setMarkerSize _deadMarkerSize
; check if player injured
?(getDammage pl1 > 0.3 && alive pl1): "pl1M" setMarkerColor "ColorYellow"
?(getDammage pl2 > 0.3 && alive pl2): "pl2M" setMarkerColor "ColorYellow"
?(getDammage pl3 > 0.3 && alive pl3): "pl3M" setMarkerColor "ColorYellow"
?(getDammage pl4 > 0.3 && alive pl4): "pl4M" setMarkerColor "ColorYellow"
?(getDammage pl5 > 0.3 && alive pl5): "pl5M" setMarkerColor "ColorYellow"
; move marker
?(leader _detectedByGroup knowsabout pl1 > 1) : "pl1M" SetMarkerPos GetPos pl1
?(leader _detectedByGroup knowsabout pl2 > 1) : "pl2M" SetMarkerPos GetPos pl2
?(leader _detectedByGroup knowsabout pl3 > 1) : "pl3M" SetMarkerPos GetPos pl3
?(leader _detectedByGroup knowsabout pl4 > 1) : "pl4M" SetMarkerPos GetPos pl4
?(leader _detectedByGroup knowsabout pl5 > 1) : "pl5M" SetMarkerPos GetPos pl5

goto "track"

my people to be followed by them are named pl1 pl2 pl3 pl4 pl5 and the markers are pl1m pl2m pl3m pl4m pl5m
the lookouts have lookout = groupthis in thier init field and i have my people to be followed as team1 = groupthis and i have the markers set off to the side of the map, my init.sqs looks like this
 ["marker",[0.25,0.25],lookout] exec "detectedUnitTracking.sqs"
exit

anything that you can see i did wrong?
« Last Edit: 17 Jun 2004, 20:05:05 by TH »