HL2DM Spawn effect
- daren adler
- Senior Member
- Posts: 328
- Joined: Sat May 18, 2019 7:42 pm
HL2DM Spawn effect
Was wondering if i can get one of you great scripters 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.
Re: HL2DM Spawn effect
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?
- daren adler
- Senior Member
- Posts: 328
- Joined: Sat May 18, 2019 7:42 pm
Re: HL2DM Spawn effect
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)
Re: HL2DM Spawn effect
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?
- daren adler
- Senior Member
- Posts: 328
- Joined: Sat May 18, 2019 7:42 pm
Re: HL2DM Spawn effect
Sounds great if you can do that , yes random colorsKami 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?
Re: HL2DM Spawn effect
Try this:
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:
You can also try the x/killstreak sprites you have. smokeball2 and smoke create some cool effects too.
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.
- daren adler
- Senior Member
- Posts: 328
- Joined: Sat May 18, 2019 7:42 pm
Re: HL2DM Spawn effect
Will do, thank you for all your good work. What can i do to make the spawn effect last a little longer before its gone away?
- daren adler
- Senior Member
- Posts: 328
- Joined: Sat May 18, 2019 7:42 pm
Re: HL2DM Spawn effect
ok got it, Thank you.
Who is online
Users browsing this forum: No registered users and 32 guests