HL2DM Spawn effect

A place for requesting new Source.Python plugins to be made for your server.

Please request only one plugin per thread.
User avatar
daren adler
Senior Member
Posts: 328
Joined: Sat May 18, 2019 7:42 pm

HL2DM Spawn effect

Postby daren adler » Sat Dec 26, 2020 9:24 pm

Was wondering if i can get one of you great scripters :smile: to make me a spawn effect like this https://steamcommunity.com/sharedfiles/ ... dsuccess=1 picture but with diffrent colors (red,blue,green) everytime you respawn,,thank you and have a great new year coming up. :cool: :cool:
User avatar
Kami
Global Moderator
Posts: 263
Joined: Wed Aug 15, 2012 1:24 am
Location: Germany

Re: HL2DM Spawn effect

Postby Kami » Sat Dec 26, 2020 10:05 pm

Should the colors be inside of one spawn effect or should you have a random chance to either get a red or a blue or a green spawn effect? Or is it ment for team play, where every team gets a different color?
User avatar
daren adler
Senior Member
Posts: 328
Joined: Sat May 18, 2019 7:42 pm

Re: HL2DM Spawn effect

Postby daren adler » Sat Dec 26, 2020 10:17 pm

Kami wrote:Should the colors be inside of one spawn effect or should you have a random chance to either get a red or a blue or a green spawn effect? Or is it ment for team play, where every team gets a different color?

Be ok if you can do all 3 kinds in one,,if not do what you think is best, and no its not a team. (the random sounds good)
User avatar
Kami
Global Moderator
Posts: 263
Joined: Wed Aug 15, 2012 1:24 am
Location: Germany

Re: HL2DM Spawn effect

Postby Kami » Sat Dec 26, 2020 10:29 pm

Mhmm, how about random colors all together? Like every spawn you can get one random color for your spawn effect. Or are you set on the three colors?
User avatar
daren adler
Senior Member
Posts: 328
Joined: Sat May 18, 2019 7:42 pm

Re: HL2DM Spawn effect

Postby daren adler » Sat Dec 26, 2020 10:39 pm

Kami wrote:Mhmm, how about random colors all together? Like every spawn you can get one random color for your spawn effect. Or are you set on the three colors?
Sounds great :smile: if you can do that , yes random colors
User avatar
Kami
Global Moderator
Posts: 263
Joined: Wed Aug 15, 2012 1:24 am
Location: Germany

Re: HL2DM Spawn effect

Postby Kami » Sat Dec 26, 2020 10:54 pm

Try this:

Syntax: Select all

from colors import GREEN
from effects.base import TempEntity
from engines.precache import Model
from events import Event
from mathlib import Vector
from players.entity import Player
import random

model = Model("sprites/lgtning.vmt")

@Event('player_spawn')
def _player_spawn(ev):
player = Player.from_userid(ev['userid'])
x = 0
r = random.randrange(0, 255)
g = random.randrange(0, 255)
b = random.randrange(0, 255)
while x < 70:
create_ring(Vector(player.origin[0],player.origin[1],player.origin[2]+x),r,g,b)
x += 10


def create_ring(position,r,g,b):
te = TempEntity('BeamRingPoint')
te.model = model
te.halo = model
te.center = 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 = r
te.green = g
te.blue = b
te.alpha = 255
te.speed = 100
te.create()



You can change the model to whatever you like, but I kinda like the lgtning sprite.

Things you can play around with to change the appearance:

Syntax: Select all

te.start_width = 10 
This will change the size of the sprite. The lower you set this the more it looks like a lightning. The higher you set it the less you see a gap between the rings. Setting it too high will make it look like a blob, instead of rings.


Syntax: Select all

te.amplitude = 10
This will set how flat each ring is. The higher you set it the more fluctuation you get.


Syntax: Select all

te.start_radius = 40
te.end_radius = 60
The more the end_radius differs from the start_radius the faster it goes (it will go from start to end in its life time, so it has to cover more distance if the distance is higher)



You can also try the x/killstreak sprites you have. smokeball2 and smoke create some cool effects too.
User avatar
daren adler
Senior Member
Posts: 328
Joined: Sat May 18, 2019 7:42 pm

Re: HL2DM Spawn effect

Postby daren adler » Sat Dec 26, 2020 10:59 pm

:smile: Will do, thank you for all your good work. :cool: :cool: What can i do to make the spawn effect last a little longer before its gone away?
User avatar
Kami
Global Moderator
Posts: 263
Joined: Wed Aug 15, 2012 1:24 am
Location: Germany

Re: HL2DM Spawn effect

Postby Kami » Sun Dec 27, 2020 12:38 am

Syntax: Select all

te.life_time = 1


This sets how long it lasts in seconds.
User avatar
daren adler
Senior Member
Posts: 328
Joined: Sat May 18, 2019 7:42 pm

Re: HL2DM Spawn effect

Postby daren adler » Sun Dec 27, 2020 12:53 am

Kami wrote:

Syntax: Select all

te.life_time = 1


This sets how long it lasts in seconds.


ok got it, Thank you. :cool:

Return to “Plugin Requests”

Who is online

Users browsing this forum: No registered users and 34 guests