IT/createBlipAttachedTo: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{IT/MainP}} __NOTOC__ {{Server client function}} This function creates a blip that is attached to an element. This blip is displayed as an icon on the client's radar an...") |
No edit summary |
||
Line 2: | Line 2: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
Questa funzione crea un [[IT/Elemento/Blip|segnalino]] che è collegato ad un [[IT/Elemento|elemento]]. Questo segnalino viene visualizzato come un'icona sul radar del client e 'seguirà' l'elemento a cui è collegato. | |||
== | ==Sintassi== | ||
<section name="Server" class="server" show="true"> | <section name="Server" class="server" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Line 11: | Line 11: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | ===Argomenti richiesti=== | ||
*'''elementToAttachTo:''' | *'''elementToAttachTo:''' L'[[IT/Elemento|elemento]] a cui attaccare il marcatore. | ||
=== | ===Argomenti Opzionali=== | ||
{{ | {{IT/Argomenti opzionali}} | ||
*'''icon:''' The icon that the radar blips should be. Valid values are: | *'''icon:''' The icon that the radar blips should be. Valid values are: | ||
{{ | {{IT/Segnalini}} | ||
*'''size:''' The size of the radar blip. Default is 2. | *'''size:''' The size of the radar blip. Default is 2. | ||
*'''r:''' The amount of red in the blip's color (0 - 255). Only applicable to the ''none'' icon. 'Default is 255. | *'''r:''' The amount of red in the blip's color (0 - 255). Only applicable to the ''none'' icon. 'Default is 255. |
Revision as of 17:05, 3 August 2011
« Torna alla Pagina principale italiana ▇▇▇.
Questa funzione crea un segnalino che è collegato ad un elemento. Questo segnalino viene visualizzato come un'icona sul radar del client e 'seguirà' l'elemento a cui è collegato.
Sintassi
Click to collapse [-]
Serverblip createBlipAttachedTo ( element elementToAttachTo, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, int ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()] )
Argomenti richiesti
- elementToAttachTo: L'elemento a cui attaccare il marcatore.
Argomenti Opzionali
NOTA: Quando usi argomenti opzionali, devi fornire tutti gli altri argomenti prima di quello che vuoi utilizzare. Per altre informazioni consulta la pagina Argomenti opzionali.
- icon: The icon that the radar blips should be. Valid values are:
- size: The size of the radar blip. Default is 2.
- r: The amount of red in the blip's color (0 - 255). Only applicable to the none icon. 'Default is 255.
- g: The amount of green in the blip's color (0 - 255). Only applicable to the none icon. Default is 0.
- b: The amount of blue in the blip's color (0 - 255). Only applicable to the none icon. Default is 0.
- a: The amount of alpha in the blip's color (0 - 255). Default is 255.
- ordering: This defines the blip's Z-level ordering (-32768 - 32767). Default is 0.
- visibleDistance: The maximum distance from the camera at which the blip is still visible
- visibleTo: What elements can see the blip. Defaults to visible to everyone. See visibility.
Click to expand [+]
ClientReturns
Returns a blip if the blip was created succesfully, or false otherwise.
Example
Click to collapse [-]
ServerThis example creates a radar blip attached to a random player, visible to everyone. The blip will follow the player around as they move. This could be used for manhunt, to emphasise a random player.
-- Pick a random player function setupRandomRobber () local myPlayer = getRandomPlayer () -- Create a radar blip at the player's position, with a 'cash' icon and only visible to everyone (no 'visibleTo' parameter) local myBlip = createBlipAttachedTo ( myPlayer, 52 ) end
See Also
- createBlip
- createBlipAttachedTo
- getBlipColor
- getBlipIcon
- getBlipOrdering
- getBlipSize
- getBlipVisibleDistance
- setBlipColor
- setBlipIcon
- setBlipOrdering
- setBlipSize
- setBlipVisibleDistance