Documentation

POI

Constructible This class can be instantiated from your script. You can find more information on the Constructor below. Auto Destroy To delete an instance of this class, use the `Destroy` function of this class. You can find the function definition below. Custom Properties You can extend instances of this class with your own properties.

A Point Of Interest in the game

Constructor

POI(number type, Vector3f position, string text)

  • type: the type of the POI
  • position: the position, where the POI is created at
  • text: optional the text/description of the point of interest

Example

var poi = new POI();

Properties

Name Type Description
type number POI type. See POI List.
progress number current value of the progress bar (0.0-1.0)
progressMax number maximal progress bar value
networkId number read only the network id of this entity. It is not unique across different entities and will be re-assigned once this entity was destroyed
position Vector3f the POI's position in the game world
minDistance number minimum distance to display the POI on the HUD
maxDistance number maximal distance to display the POI on the HUD
text string text for the POI
visible boolean whether the POI is visible to all Players.
flashing boolean whether the POI should flash on the HUD
clampedToScreen boolean whether the POI should be clamped to the HUD (when not in direct view, they will stay at the edges of the screen)
dimension number world dimension of the POI.

Functions

POI.SetVisibleForPlayer(Player player, boolean visible)

Sets the visibility of the POI for a certain Player

Parameter

Name Type Description
player Player target Player
visible boolean whether the POI should be visible (true = visible, false = not visible)

Example

var myPOI = new POI(0, new Vector3f(0.0,0.0,0.0), "Test POI");
jcmp.events.Add('PlayerReady', player => {
  myPOI.SetVisibleForPlayer(player, true);
});           

POI.IsVisibleForPlayer(Player player)

Returns whether the POI is visible for a certain Player

  • true = visible
  • false = not visible

returns: boolean

Parameter

Name Type Description
player Player target Player

Example

var myPOI = new POI(0, new Vector3f(0.0,0.0,0.0), "Test POI");
jcmp.events.Add('PlayerReady', player => {
  if (myPOI.SetVisibleForPlayer(player) == true){
    //POI is currently visible to the player
  }else{
    //POI is not visible to the player
  }
});        

POI.Destroy()

Destroys the POI

Stay informed

By becoming the newest member of our growing forums, we and hundreds of other players will always keep you up to date on everything JC3:MP related.