Difference between revisions of "StartEntityHighlight"

From Nomad DB
(Created page with "Outlines an entity with a chosen color. If that entity is a player and the player enters a vehicle the vehicle is highlighted instead. Outlines can be seen through obstaces in...")
 
Line 1: Line 1:
Outlines an entity with a chosen color. If that entity is a player and the player enters a vehicle the vehicle is highlighted instead. Outlines can be seen through obstaces in the way of sight.
+
Outlines an entity the specified color. If the specified entity is a pawn, its current vehicle will be outlined instead. Outlines can be seen through obstaces in the line of sight.
  
 
== Syntax ==
 
== Syntax ==
Line 5: Line 5:
 
StartEntityHighlight(entityId, colorId)
 
StartEntityHighlight(entityId, colorId)
 
</syntaxhighlight>
 
</syntaxhighlight>
* '''entityId''' (string): The [[EntityId|ID]] of the entity to highlight
+
* '''entityId''' (string): The [[EntityId|ID]] of the entity to be highlighted
 
* '''colorId''' (string): The [[#Colors|color]] to use for the highlight
 
* '''colorId''' (string): The [[#Colors|color]] to use for the highlight
  
 
== Example ==
 
== Example ==
Highlights the own player in blue.
+
Creates a blue outline on the local player.
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
StartEntityHighlight(GetLocalPlayerEntityId(), 3)
 
StartEntityHighlight(GetLocalPlayerEntityId(), 3)

Revision as of 19:20, 16 April 2020

Outlines an entity the specified color. If the specified entity is a pawn, its current vehicle will be outlined instead. Outlines can be seen through obstaces in the line of sight.

Syntax

StartEntityHighlight(entityId, colorId)
  • entityId (string): The ID of the entity to be highlighted
  • colorId (string): The color to use for the highlight

Example

Creates a blue outline on the local player.

StartEntityHighlight(GetLocalPlayerEntityId(), 3)

Parameters

Colors

Example of available highlight colors on the player
ID Color
0 White
1 Yellow
2 Red
3 Blue
4 Green
5 Purple
6 Orange

Related Pages