Visibility: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
{{Needs_Checking|Undefined definition}}
The visibility system for markers and blips works by the following rule: if something is visible for a certain element, it is also visible for all of that element's children. Also, everything is visible to the root element by default.
 
This means that if you want to make e.g. a blip only visible for a few specific players, you need to do two things:
* Make the blip invisible to the root element, using [[setElementVisibleTo]]. The blip is now hidden for all players.
* Make the blip visible again for the desired players. You can use [[setElementVisibleTo]] after the blip has been created, or you can use the "visibleTo" parameter in your call to [[createBlip]] (in this last case, you are making the blip visible to a player first, and only then hiding it from the root element).
The same things go for markers.

Revision as of 16:49, 5 April 2009

The visibility system for markers and blips works by the following rule: if something is visible for a certain element, it is also visible for all of that element's children. Also, everything is visible to the root element by default.

This means that if you want to make e.g. a blip only visible for a few specific players, you need to do two things:

  • Make the blip invisible to the root element, using setElementVisibleTo. The blip is now hidden for all players.
  • Make the blip visible again for the desired players. You can use setElementVisibleTo after the blip has been created, or you can use the "visibleTo" parameter in your call to createBlip (in this last case, you are making the blip visible to a player first, and only then hiding it from the root element).

The same things go for markers.