Home   Help Search Login Register  

Author Topic: Making Markers appear by Trigger in-game  (Read 643 times)

0 Members and 1 Guest are viewing this topic.

Offline 3frog

  • Members
  • *
  • TuK forever
Making Markers appear by Trigger in-game
« on: 09 May 2004, 18:53:03 »
I would like an ai to hit a certian trigger and, thus doing this- put a marker on the map...

This way it will look as if the ai has called for support, telling us were enemies are, need pickup, medic, etc... I think you can see the posssiblities.



 ;D[TuK][Dm]3frog[O-R]
thnx ppl.

Kammak

  • Guest
Re:Making Markers appear by Trigger in-game
« Reply #1 on: 09 May 2004, 22:52:49 »
First, place the marker(s) anywhere on the map, and set the type to type to "Empty".  Set the text to be whatever you want shown when the marker is visible.

To make it visible, run the code below in the Activation field of a trigger, or through a script, whatever:

For this example, a unit is named hGuy, and a marker is named markerNeedHelp.

"markerNeedHelp" setMarkerPos getpos hGuy;"markerNeedHelp" setMarkerType "WARNING"

AKAIK you cannot create a marker at runtime, you can only change the marker type.  Placing a marker type of "Empty" in the editor makes it invisible at runtime...so changing it to some other type at runtime makes it appear.

Also, AKAIK you can't change the text of a marker, so you have to set the text in the editor and live with it throughout the mission.

The command reference has the marker type strings.

Note - when working with markers, the name is treated as a string so it has to been enclosed in quotes...unlike most things in the game which are treated as objects and don't need quotes.