set transparency||doc135478

September 20, 2022


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


Sets the alpha channel of the solid object Actor.


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.


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)