i was trying to make my laser effect fading.
This is my current code without fading:
Syntax: Select all
hitEffect = TempEntity('BeamPoints', alpha=player.beamOpacity, red=player.beamColor[0], green=player.beamColor[1], blue=player.beamColor[2], life_time=3, fade_length=1, start_width=5, end_width=5, frame_rate=200, start_point=playerOrigin, end_point=shootDirection, model=laser_model, amplitude=1, flags=0, speed=1, halo=laser_model, start_frame=0)
hitEffect.create()
The only solution i came up with was destroying the effect, recreating it in a while loop and setting the opacity value to a lower or higher number in the loop.
Do you have any other idea how to accomplish it?
I tried to set the alpha value in a while loop aswell but the entity didn't "update" the opacity.
Cheers!