Page 1 of 1

Creating a BeamRingPoint?

Posted: Sat Dec 11, 2021 8:34 am
by Mahi
Hi, I am unable to create a simple BeamRingPoint:

Syntax: Select all

model = Model('sprites/lghtning.vmt')
te = TempEntity('BeamRingPoint')
te.model = model
te.halo = model
te.center = player.position
te.start_radius = 40
te.end_radius = 60
te.frame_rate = 100
te.life_time = 1
te.start_width = 10
te.end_width = 60
te.fade_length = 6
te.amplitude = 10
te.red = 255
te.green = 100
te.blue = 100
te.alpha = 255
te.speed = 100
te.create()
print('Hello') # The code is definitely being executed

It simply doesn't show anything.

Replacing the temp entity with 'BeamPoints' and instead of center using start_point=player.origin and end_point=other_player.origin works perfectly.

Is there something wrong with BeamRingPoint in particular, or am I doing something wrong?

Re: Creating a BeamRingPoint?

Posted: Sat Dec 11, 2021 1:56 pm
by satoon101
What is player.position? I think I remember having to increment the z value of the player's origin with BeamRingPoint, otherwise the effect was in the ground.

Syntax: Select all

center = player.origin
center.z += 10
te.center = center

Re: Creating a BeamRingPoint?

Posted: Sat Dec 11, 2021 2:14 pm
by satoon101
I tested your code using my suggestion, but also just using player.origin instead of player.position, and both worked fine. I did have to use a different sprite, though (I used sprites/laser.vmt, since sprites/lghtning.vmt did not work on either of my tests). What game are you testing this on? I am testing on CS:S.

Re: Creating a BeamRingPoint?

Posted: Sat Dec 11, 2021 8:00 pm
by Kami
Hey,

not sure if I'm right, but shouldn't the model be "sprites/lgtning.vmt" without the h?

Re: Creating a BeamRingPoint?

Posted: Sun Dec 12, 2021 6:40 am
by Mahi
satoon101 wrote:I did have to use a different sprite, though (I used sprites/laser.vmt, since sprites/lghtning.vmt did not work on either of my tests). What game are you testing this on? I am testing on CS:S.

Using sprites/laserbeam.vmt did the trick finally, neither lgtning nor laser worked for me. On CS:GO.

Thanks for the help! :-)