Home   Help Search Login Register  

Author Topic: Marker Text  (Read 1652 times)

0 Members and 1 Guest are viewing this topic.

Offline surpher

  • Members
  • *
Marker Text
« on: 02 Jun 2004, 12:40:54 »
Hi All :wave:

I'm making a coop map, and i've got a tracking script tracing all the players with markers (dots) on the map. Is it possible to have the unique player names attached to these makers. Like say a script that executes in the init.sqs, gets the player name, and then changes the marker text.

Offline rhysduk

  • Former Staff
  • ****
Re:Marker Text
« Reply #1 on: 02 Jun 2004, 12:48:35 »
According to the COMREF that i posses (comes with CHOFPSE) you do a lot fo things to a marker, set its position, size, type and colour but not its text :(

I don tknow if script syntax works in feilds (like the TEXT feild in a marker), i doubt very much it does... but if it does you could make a little script to display the name of the player/unit.

Rhys
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Marker Text
« Reply #2 on: 02 Jun 2004, 12:49:10 »
There's no command I'm aware of that would change a markers text.
Not all is lost.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Marker Text
« Reply #3 on: 03 Jun 2004, 03:06:15 »
Just give each of the markers a unique name in the editor (alpha, bravo, charlie, etc). Then set the radio callsigns of the players to match the name of their marker.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline rhysduk

  • Former Staff
  • ****
Re:Marker Text
« Reply #4 on: 03 Jun 2004, 15:42:21 »
Will this really do what surpher asked ??? Cool!

Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Marker Text
« Reply #5 on: 03 Jun 2004, 18:44:56 »
No, it won't, but it's a cheap substitude  :D
Not all is lost.

Offline surpher

  • Members
  • *
Re:Marker Text
« Reply #6 on: 03 Jun 2004, 19:36:18 »
I'll try it to see what it looks like, but how do I set the radio callsigns of the players.

Offline surpher

  • Members
  • *
Re:Marker Text
« Reply #7 on: 05 Jun 2004, 16:10:32 »
Hi all :wave:

Given up on attaching player names to markers for the time being. Anyone got any ideas how I can reduce the size of this script.

Code: [Select]
;##############################################################################
;
;   playerTracking.sqs version 1
;   by surpher (based on a script called GPS.sqs)
;
;   Tracks player movement on the map with and marker,
;   also determines wether injured or dead.
;   
;   You may need to edit player and marker names in this script.
:
;   [markerType,[markerSize]] Exec "playerTracking.sqs"
;   Calling Example. ["marker",[0.25,0.25]] Exec "playerTracking.sqs"
;
;##############################################################################


_deadMarkerType = _this select 0
_deadMarkerSize = _this select 1
~2
#track
; check if player dead
?!(alive pl1): "pl1M" Setmarkertype _deadMarkerType and "pl1M" setmarkercolor "ColorRed" and  "pl1M" setMarkerSize _deadMarkerSize
?!(alive pl2): "pl2M" Setmarkertype _deadMarkerType and "pl2M" setmarkercolor "ColorRed" and  "pl2M" setMarkerSize _deadMarkerSize
?!(alive pl3): "pl3M" Setmarkertype _deadMarkerType and "pl3M" setmarkercolor "ColorRed" and  "pl3M" setMarkerSize _deadMarkerSize
?!(alive pl4): "pl4M" Setmarkertype _deadMarkerType and "pl4M" setmarkercolor "ColorRed" and  "pl4M" setMarkerSize _deadMarkerSize
?!(alive pl5): "pl5M" Setmarkertype _deadMarkerType and "pl5M" setmarkercolor "ColorRed" and  "pl5M" setMarkerSize _deadMarkerSize
?!(alive pl6): "pl6M" Setmarkertype _deadMarkerType and "pl6M" setmarkercolor "ColorRed" and  "pl6M" setMarkerSize _deadMarkerSize
?!(alive pl7): "pl7M" Setmarkertype _deadMarkerType and "pl7M" setmarkercolor "ColorRed" and  "pl7M" setMarkerSize _deadMarkerSize
?!(alive pl8): "pl8M" Setmarkertype _deadMarkerType and "pl8M" setmarkercolor "ColorRed" and  "pl8M" setMarkerSize _deadMarkerSize
?!(alive pl9): "pl9M" Setmarkertype _deadMarkerType and "pl9M" setmarkercolor "ColorRed" and  "pl9M" setMarkerSize _deadMarkerSize
?!(alive pl10): "pl10M" Setmarkertype _deadMarkerType and "pl10M" setmarkercolor "ColorRed" and  "pl10M" setMarkerSize _deadMarkerSize
?!(alive pl11): "pl11M" Setmarkertype _deadMarkerType and "pl11M" setmarkercolor "ColorRed" and  "pl11M" setMarkerSize _deadMarkerSize
?!(alive pl12): "pl12M" Setmarkertype _deadMarkerType and "pl12M" setmarkercolor "ColorRed" and  "pl12M" setMarkerSize _deadMarkerSize
?!(alive pl13): "pl13M" Setmarkertype _deadMarkerType and "pl13M" setmarkercolor "ColorRed" and  "pl13M" setMarkerSize _deadMarkerSize
?!(alive pl14): "pl14M" Setmarkertype _deadMarkerType and "pl14M" setmarkercolor "ColorRed" and  "pl14M" setMarkerSize _deadMarkerSize
?!(alive pl15): "pl15M" Setmarkertype _deadMarkerType and "pl15M" setmarkercolor "ColorRed" and  "pl15M" setMarkerSize _deadMarkerSize
?!(alive pl16): "pl16M" Setmarkertype _deadMarkerType and "pl16M" setmarkercolor "ColorRed" and  "pl16M" setMarkerSize _deadMarkerSize
?!(alive pl17): "pl17M" Setmarkertype _deadMarkerType and "pl17M" setmarkercolor "ColorRed" and  "pl17M" setMarkerSize _deadMarkerSize
?!(alive pl18): "pl18M" Setmarkertype _deadMarkerType and "pl18M" setmarkercolor "ColorRed" and  "pl18M" setMarkerSize _deadMarkerSize
?!(alive pl19): "pl19M" Setmarkertype _deadMarkerType and "pl19M" setmarkercolor "ColorRed" and  "pl19M" setMarkerSize _deadMarkerSize
?!(alive pl20): "pl20M" Setmarkertype _deadMarkerType and "pl20M" setmarkercolor "ColorRed" and  "pl20M" setMarkerSize _deadMarkerSize
; check if player injured
?(getDammage pl1 > 0.3): "pl1M" setMarkerColor "ColorYellow"
?(getDammage pl2 > 0.3): "pl2M" setMarkerColor "ColorYellow"
?(getDammage pl3 > 0.3): "pl3M" setMarkerColor "ColorYellow"
?(getDammage pl4 > 0.3): "pl4M" setMarkerColor "ColorYellow"
?(getDammage pl5 > 0.3): "pl5M" setMarkerColor "ColorYellow"
?(getDammage pl6 > 0.3): "pl6M" setMarkerColor "ColorYellow"
?(getDammage pl7 > 0.3): "pl7M" setMarkerColor "ColorYellow"
?(getDammage pl8 > 0.3): "pl8M" setMarkerColor "ColorYellow"
?(getDammage pl9 > 0.3): "pl9M" setMarkerColor "ColorYellow"
?(getDammage pl10 > 0.3): "pl10M" setMarkerColor "ColorYellow"
?(getDammage pl11 > 0.3): "pl11M" setMarkerColor "ColorYellow"
?(getDammage pl12 > 0.3): "pl12M" setMarkerColor "ColorYellow"
?(getDammage pl13 > 0.3): "pl13M" setMarkerColor "ColorYellow"
?(getDammage pl14 > 0.3): "pl14M" setMarkerColor "ColorYellow"
?(getDammage pl15 > 0.3): "pl15M" setMarkerColor "ColorYellow"
?(getDammage pl16 > 0.3): "pl16M" setMarkerColor "ColorYellow"
?(getDammage pl17 > 0.3): "pl17M" setMarkerColor "ColorYellow"
?(getDammage pl18 > 0.3): "pl18M" setMarkerColor "ColorYellow"
?(getDammage pl19 > 0.3): "pl19M" setMarkerColor "ColorYellow"
?(getDammage pl20 > 0.3): "pl20M" setMarkerColor "ColorYellow"
; move marker
"pl1M" SetMarkerPos GetPos pl1
"pl2M" SetMarkerPos GetPos pl2
"pl3M" SetMarkerPos GetPos pl3
"pl4M" SetMarkerPos GetPos pl4
"pl5M" SetMarkerPos GetPos pl5
"pl6M" SetMarkerPos GetPos pl6
"pl7M" SetMarkerPos GetPos pl7
"pl8M" SetMarkerPos GetPos pl8
"pl9M" SetMarkerPos GetPos pl9
"pl10M" SetMarkerPos GetPos pl10
"pl11M" SetMarkerPos GetPos pl11
"pl12M" SetMarkerPos GetPos pl12
"pl13M" SetMarkerPos GetPos pl13
"pl14M" SetMarkerPos GetPos pl14
"pl15M" SetMarkerPos GetPos pl15
"pl16M" SetMarkerPos GetPos pl16
"pl17M" SetMarkerPos GetPos pl17
"pl18M" SetMarkerPos GetPos pl18
"pl19M" SetMarkerPos GetPos pl19
"pl20M" SetMarkerPos GetPos pl20
Goto "track"

Offline rhysduk

  • Former Staff
  • ****
Re:Marker Text
« Reply #8 on: 05 Jun 2004, 17:09:02 »
Hi surpher,

I take it that this script is used for keeping markers at the position that the player is at? IE tracking the units position?

If this is the case then the script can be cut down by more than a half of the lenght you have it now.

Bear in mind because of the lenght of the script, there would be a significant delay between tracking each of hte units in the script.. because the longer the script the longer it takes to get to the Goto "track" bit of the script...

I have a script tht does exactly this, it tracks a units position (currently set at six) for a MP map im making, if you want let me know...

Also,

Why would u want to set the marker colour and type using the script? (im referring to the first part of the script, the ?!(alive pl1) parts, why cant u set the colour of the markers, and their types int he editor and stick them in the top corner of the map out of the way, until they are called for? Then you can just set their colour to yellow for the next part of the script..

Hope this helps,

Rhys
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Offline surpher

  • Members
  • *
Re:Marker Text
« Reply #9 on: 05 Jun 2004, 17:36:16 »
Hi rhysduk

Yeah I'd love to take a look at your script.

The ?!(alive pl1) parts of the script just change the marker to a red cross once the player is dead. I have set my markers as green dot in the editor and placed them in the corner of the map. The middle part of the script which I have now changed just indicates that the player is injured.

Code: [Select]
; 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"
?(getDammage pl6 > 0.3 && alive pl6): "pl6M" setMarkerColor "ColorYellow"
?(getDammage pl7 > 0.3 && alive pl7): "pl7M" setMarkerColor "ColorYellow"
?(getDammage pl8 > 0.3 && alive pl8): "pl8M" setMarkerColor "ColorYellow"
?(getDammage pl9 > 0.3 && alive pl9): "pl9M" setMarkerColor "ColorYellow"
?(getDammage pl10 > 0.3 && alive pl10): "pl10M" setMarkerColor "ColorYellow"
?(getDammage pl11 > 0.3 && alive pl11): "pl11M" setMarkerColor "ColorYellow"
?(getDammage pl12 > 0.3 && alive pl12): "pl12M" setMarkerColor "ColorYellow"
?(getDammage pl13 > 0.3 && alive pl13): "pl13M" setMarkerColor "ColorYellow"
?(getDammage pl14 > 0.3 && alive pl14): "pl14M" setMarkerColor "ColorYellow"
?(getDammage pl15 > 0.3 && alive pl15): "pl15M" setMarkerColor "ColorYellow"
?(getDammage pl16 > 0.3 && alive pl16): "pl16M" setMarkerColor "ColorYellow"
?(getDammage pl17 > 0.3 && alive pl17): "pl17M" setMarkerColor "ColorYellow"
?(getDammage pl18 > 0.3 && alive pl18): "pl18M" setMarkerColor "ColorYellow"
?(getDammage pl19 > 0.3 && alive pl19): "pl19M" setMarkerColor "ColorYellow"
?(getDammage pl20 > 0.3 && alive pl20): "pl20M" setMarkerColor "ColorYellow"

So that:
Green Dot = health player
Yellow Dot = injured player
Red Cross = dead player

Offline rhysduk

  • Former Staff
  • ****
Re:Marker Text
« Reply #10 on: 05 Jun 2004, 22:44:48 »
Yo,

Ill send you script via IM, sry chaps, nothing personal :)

Ah i see your reasoning behind it, i seem to have misread or misunderstood that part ;)

A nice script though...

Rhys
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Offline surpher

  • Members
  • *
Re:Marker Text
« Reply #11 on: 08 Jun 2004, 20:37:34 »
Ok I have reduced the size of my script right down with the use of some loops :), but I've come up against another problem :(. When a unit is killed I have to pause the script until another unit in the group detects that the unit is dead (oh no 1 is down) because that's when the group array is reduced. If I don't do this the group and marker arrays get muddled up. Oh when I pause the script it stops tracking :(.

I was just wondering whether some of you pro-scripters would be kind enough to take a look at the script and give me any suggestions on how to get around the pause.