set transparency||doc135478

September 20, 2022

Format

 Entity:setAlpha(alpha, time) 
  • The class to which the function belongs:Entity

Description

Sets the alpha channel of the solid object Actor.


Precautions

If you want the solid object to be completely transparent, instead of setting the alpha value to 0, set a very small value like 0.001.


Parameters

Variable name type Description
alpha float Alpha channel
time int Gradient time, in ticks


Code Samples

on the object clientmount script, set the entity object Actor to be translucent

this:setAlpha(0.5, 1)