Creating a BeamRingPoint?

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
Mahi
Senior Member
Posts: 236
Joined: Wed Aug 29, 2012 8:39 pm
Location: Finland

Creating a BeamRingPoint?

Postby Mahi » Sat Dec 11, 2021 8:34 am

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?
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Creating a BeamRingPoint?

Postby satoon101 » Sat Dec 11, 2021 1:56 pm

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
Image
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Creating a BeamRingPoint?

Postby satoon101 » Sat Dec 11, 2021 2:14 pm

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.
Image
User avatar
Kami
Global Moderator
Posts: 263
Joined: Wed Aug 15, 2012 1:24 am
Location: Germany

Re: Creating a BeamRingPoint?

Postby Kami » Sat Dec 11, 2021 8:00 pm

Hey,

not sure if I'm right, but shouldn't the model be "sprites/lgtning.vmt" without the h?
User avatar
Mahi
Senior Member
Posts: 236
Joined: Wed Aug 29, 2012 8:39 pm
Location: Finland

Re: Creating a BeamRingPoint?

Postby Mahi » Sun Dec 12, 2021 6:40 am

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! :-)

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 32 guests