Half-Life Re-imagined competition results on their way...
Check out Skewing textures in Hammer, our newest tutorial!
Say hello to csapdani, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

8

Cobalt

15

Turquoise

4

Cyan

7

Royal

3

Teal

3

Onliners

1 mins

Windawz

18 mins

Bruce

22 mins

Jessie

23 mins

Strider

24 mins

Admer456

24 mins

Solokiller

34 mins

Urby

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

Pretty Effects with Spirit of Half-Life

By Jonathan 'Teh_Freak' Smith

With the introduction of the env_particle entity, the DarkTruths particle engine (Aurora) is now implemented in the Spirit of Half-Life toolkit. Sure you could use Aurora, editing the .AUR files, but for those of us that think it is a bit confusing or just don't want to convert to v1.2 this is for you. This article will show you four effects (well, quite pretty effects) that can be done with the env_shooter along with trigger_relays, multi_managers, and env_renders.

This article utilizes a concept known in Spirit of Half-Life known as "Locus". When an entity is triggered ("The Effect"), another entity ("The Cause") is usually responsible for targetting it. Locus acts as an "open variable", inserting the Cause's data into the Effect's data. An example from the Spirit of Half-Life documentation:

An obvious use for Locus would be in a multiplayer level, to make a special invisibility powerup. Have a trigger_once which targets an env_render, and tell the env_render to affect "*locus". The first player who walks into the trigger will then be the "locus" of your env_render, and it will make him invisible.

Of course, remember that entities other than the player can be a Locus.

Effect 1: Dripping Water with a Splash

This effect isn't the prettiest effect, but when used can make nice little touches to a level. First, create an env_shooter. What this does is create a shooter that has blueish colored 'drops' that shoot down. The remove_water value for Fire on collision (locus = shot) is very important, you'll soon see why.


env_shooter
Name water
Pitch Yaw Roll (Y Z X) 90 0 0
Number of shots 1
Gib Speed Factor [LR] 200
Course Variance 0
Shot lifetime (secs) 4
Rendermode Additive
FX Amount 100
FX Color 128 128 255
Model or Sprite name sprites/flare2.spr
Scale 0.2
Behaviour of children Arc (obey Gravity)
Fire on collision (locus = shot) remove_water

Flags:
Repeatable

Now make a second env_shooter. This env_shooter creates the 'splash' effect when remove_water is called.


env_shooter
Name remove_water
Pitch Yaw Roll (Y Z X) -90 0 0
Number of shots 5
Gib Speed Factor [LR] 200
Course Variance 0.15
Shot lifetime (secs) 1
Rendermode Additive
FX Amount 100
FX Color 128 128 255
Model or Sprite name sprites/flare1.spr
Scale 0.1
Behaviour of children Arc (obey Gravity)

Flags:
Repeatable

Now create a trigger_relay. What this does is make the first env_shooter's water drop disappear. The shot is acting as the *locus and targets the trigger_relay, which killtargets that specific shot.


trigger_relay
Name remove_water
KillTarget *locus

Now for the final entity for this simple effect, a multi_manager (Smart Edit off):


multi_manager
wait 0.1
maxwait 4
water 0
targetname water_dropper




Effect 2: Sparks

This is a nice effect I stumbled upon, it looks quite nice for sparks. Let's start shall we? Place down an env_shooter:


env_shooter
Name spark
Pitch Yaw Roll (Y Z X) -90 0 0
Number of shots 7
Gib Speed Factor [LR] 300
Course Variance 2
Shot lifetime (secs) 1
Fire on spawn (locus = shot) spark_render
Rendermode Additive
FX Amount 100
FX Color 128 128 255
Model or Sprite name sprites/yelflare2.spr
Scale 0.5
Behaviour of children Arc (obey Gravity)

Flags:
Repeatable

Well, that's the only shooter for this effect, now for the env_render. It makes each sprite shrink nearly instantly. Thus making it look like the env_spark entity when it first fires.


env_render
Name spark_render
Rendermode Additive
FX Amount 100
Scale 0.1
Target to affect *locus
Fade time (secs) 0.15

Now to finish it off, a multi_manager. This finishes the spark effect, it is quite nice.(Smart Edit off):


multi_manager
spark 0
targetname sparker
wait 1
maxwait 4

If you want to have the spark sounds play, place some ambient_generics with the spark noises in the WAV Name fields. Now place a multi_manager with the values:


multi_manager
targetname spark_render
mode 1
spark_sound1 100 NOTE: spark_sound1 is just a placeholder name, put whatever you named the ambient_generics, always have the value set to 100 though, this gives each ambient_generic an equal chance to get targeted to play




Effect 3: Fountain


A very pretty effect, very cool looking when the Pitch Yaw Roll is set to -90 0 0. Well, let's start, place an env_shooter:


env_shooter
Name fountain
Pitch Yaw Roll (Y Z X) 0 90 0
Number of shots 1
Gib speed factor [LR] 300
Course Variance 0.1
Shot lifetime (secs) 2
Fire on spawn (locus = shot) fountain_render
Rendermode Additive
FX Amount 100
Model or Sprite name sprites/xspark3.spr
Scale 0.3
Behavior of children Arc (obey gravity)
Fire on collision (locus = shot) remove_fountain

Flags:
Repeatable

If you made the Pitch Yaw Roll value -90 0 0, you might notice it looks like the Aurora particle system called "galaxy". If you want a different water look, change the sprite from sprites/xspark3.spr to sprites/flare1.spr. You'll also want to set the scale in the env_render to 0 and the FX Color to a blue.

Now place an env_render:


env_render
Name fountain_render
Rendermode Additive
FX Amount 255
Scale 2
Target to affect *locus
Fade time (secs) 1.5

Now for the trigger_relay to 'kill' the water when it hits the ground:


trigger_relay
Name remove_fountain
KillTarget *locus

And finally the multi_manager to wrap it up (Smart Edit off):


multi_manager
water 0
targetname water_fountain




Effect 4: Fire


This is probably the best (or one of the best) looking effects I've come up with. Like it's name says, it is fire, very nice looking fire. Place an env_shooter:


env_shooter
Name fire
Pitch Yaw Roll (Y Z X) -90 0 0
Number of shots 2
Delay between shots 0.01
Gib speed factor [LR] 50
Course Variance 0.15
Shot lifetime (secs) 3
Fire on spawn (locus = shot) fire_render
Rendermode Additive
FX Amount 100
FX Color 255 128 64
Model or Sprite name sprites/flare3.spr
Scale 1
Behavior of children Noclip

Flags:
Repeatable

Now for the env_render, this really makes the fire nice:


env_render
Name fire_render
Rendermode Additive
FX Amount 100
FX Color 128 128 255
Scale 0.3
Target to affect *locus
Fade time (secs) 4

Basically, this shrinks the sprites and changes their color at the same time to a bluish color. Looks very nice, but to finish it, we need a multi_manager:


multi_manager
fire 0.1
targetname flames

Now if you compile your map, you'll see some nice effects with the env_shooter in combination with env_renders, trigger_relays, and multi_managers. However, this is just the base of the cliff! There are many more things you can do with it, along with other entities like the env_shockwave. I've also attached an example map that has a few other effects.