Entity::alpha: Difference between revisions
CocaColaBear (talk | contribs) (Created page with "This property using for setting or getting entity alpha. == Example == <syntaxhighlight lang="javascript"> let alpha = player.alpha; player.alpha = 0; // make the player trans...") |
No edit summary |
||
| Line 1: | Line 1: | ||
This property using for setting or getting entity alpha. | This property using for setting or getting entity alpha. | ||
==Getter== | |||
* '''<span style="color:#008017">Number</span>''' | |||
==Setter== | |||
* '''<span style="color:#008017">Number</span>''' | |||
== Example == | == Example == | ||
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;"> | |||
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div> | |||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
const alpha = player.alpha; | |||
console.log(alpha) // return e.g. 255 | |||
player.alpha = 0; // make the player transparent | player.alpha = 0; // make the player transparent | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</div> | |||
==See Also== | ==See Also== | ||
{{Entity_block}} | {{Entity_block}} | ||
Revision as of 14:36, 13 May 2017
This property using for setting or getting entity alpha.
Getter
- Number
Setter
- Number
Example
Server-Side
const alpha = player.alpha;
console.log(alpha) // return e.g. 255
player.alpha = 0; // make the player transparent