O
omnix32
Guest
like the level d1_town_05 first level you meet snipers.
you need:
1 "npc_sniper"
2 Several "npc_snipertarget"
3 something to trigger your sniper to start sniping. "trigger_once?"
4 "env_shooter" if you want a body to fall out of the window. that's how they did it in the game.
set one npc_snipertarget on the ground and give it a group name (snip). in the flags check "resume if interuppted".
copy a bunch to the positions where the beam is going to go to. this gives it a more real or interesting look.
next create npc_sniper and put them in the position or window that they will be sniping from. you can see the sniper if you want, but they shoot from there legs and don't move so it looks really silly. we need to make sure we can't see this sniper.
in the window area you put them in I would texture the sides of the room Halflife/black. do a texture serch for black. you can use your own variables.
NPC_SNIPER
name: sniper_1
pitch/yaw/roll: use the point At to have the sniper look down in the direction they will be firing.
rendermode: don't render (so you don't see the sniper)
beam brightness: 255
-----------
flags: long visibility shoot checked.
next we need a trigger to start our sniper. this will cause him to scan the sniper_targets with the beam.
trigger_multiple
name: trig_multi
---------
output tab:
my output named: On trigger
target entities named: sniper_1 (name of our sniper)
via this output: SweepGroupRandomaly (tells command for sniper to start doing)
with a parameter override of: snip (group name of your sniper_targets)
the sniper will start to sweep the targets once the trigger is triggered and shoot at the player if the player gets in the way or in sight.
the sniper can only be killed by the RPG or gernades. so once you toss a nade into the window the sniper dies.
if you want a body to fall out of the window you need a env_shooter.
set the shooter right at the edge of the window and point it in the direction of the opening.
set the shooter with these param's
env_shooter
name: dead_combine
gib direction: the direction that the body will fly
number of gibs: 1 (we only need one body)
gib velocity: 150 you may have to adjust this
course variance: 0
gib life: 30
model: models/Combine_Soldier.mdl
simulate: ragdoll
gib skin: 0
now we need to set up a trigger to let the env_shooter know that it needs to spew out a dead combine. go back to your NPC_Sniper and open the output tab.
Npc_sniper (output tab) put these in order
OnDeath
sniper_1
kill
New line:
OnDeath
dead_combine
shoot
now the original sniper will dissapear as the kill command gets ride of that entity. the next line will tell the shooter to throw out a dead combine from the window.
Now let's say that we run up and get behind a wall with some barrels and boxes that need destroyed by the sniper. remember how the sniper in the game hit other things besides shooting at us?
put some sniper_target's with a different group name in front of the things you want the sniper to shoot at.
set a trigger_once by the wall the player will run behind to trigger this event.
sniper_targets
group name: hitme
-----------
flags
shoot_me
no interuptions.
now we will change how the sniper acts by the trigger the player set off.
put these in order
OnTrigger
sniper_1
SweepTargetHighestPriority
shoot_me (param override)
the sniper will now shoot these targets. goto add new output and set the sniper back to normal.
OnTrigger
trig_multi
Toggle
sets the sniper back into sweep mod from original trigger.
I have not worked out every possible bug and I do not understand everything about the sniper. I know this works like it's suppose to as I figured it out by looking at the code of the original d1_town_05. there was alot to look at and sift through so I might have missed some things.
If you want my sample map. my e-mail is
[email protected]
I will only mail these back until Dec 31 2004 thats a saturday.
you need:
1 "npc_sniper"
2 Several "npc_snipertarget"
3 something to trigger your sniper to start sniping. "trigger_once?"
4 "env_shooter" if you want a body to fall out of the window. that's how they did it in the game.
set one npc_snipertarget on the ground and give it a group name (snip). in the flags check "resume if interuppted".
copy a bunch to the positions where the beam is going to go to. this gives it a more real or interesting look.
next create npc_sniper and put them in the position or window that they will be sniping from. you can see the sniper if you want, but they shoot from there legs and don't move so it looks really silly. we need to make sure we can't see this sniper.
in the window area you put them in I would texture the sides of the room Halflife/black. do a texture serch for black. you can use your own variables.
NPC_SNIPER
name: sniper_1
pitch/yaw/roll: use the point At to have the sniper look down in the direction they will be firing.
rendermode: don't render (so you don't see the sniper)
beam brightness: 255
-----------
flags: long visibility shoot checked.
next we need a trigger to start our sniper. this will cause him to scan the sniper_targets with the beam.
trigger_multiple
name: trig_multi
---------
output tab:
my output named: On trigger
target entities named: sniper_1 (name of our sniper)
via this output: SweepGroupRandomaly (tells command for sniper to start doing)
with a parameter override of: snip (group name of your sniper_targets)
the sniper will start to sweep the targets once the trigger is triggered and shoot at the player if the player gets in the way or in sight.
the sniper can only be killed by the RPG or gernades. so once you toss a nade into the window the sniper dies.
if you want a body to fall out of the window you need a env_shooter.
set the shooter right at the edge of the window and point it in the direction of the opening.
set the shooter with these param's
env_shooter
name: dead_combine
gib direction: the direction that the body will fly
number of gibs: 1 (we only need one body)
gib velocity: 150 you may have to adjust this
course variance: 0
gib life: 30
model: models/Combine_Soldier.mdl
simulate: ragdoll
gib skin: 0
now we need to set up a trigger to let the env_shooter know that it needs to spew out a dead combine. go back to your NPC_Sniper and open the output tab.
Npc_sniper (output tab) put these in order
OnDeath
sniper_1
kill
New line:
OnDeath
dead_combine
shoot
now the original sniper will dissapear as the kill command gets ride of that entity. the next line will tell the shooter to throw out a dead combine from the window.
Now let's say that we run up and get behind a wall with some barrels and boxes that need destroyed by the sniper. remember how the sniper in the game hit other things besides shooting at us?
put some sniper_target's with a different group name in front of the things you want the sniper to shoot at.
set a trigger_once by the wall the player will run behind to trigger this event.
sniper_targets
group name: hitme
-----------
flags
shoot_me
no interuptions.
now we will change how the sniper acts by the trigger the player set off.
put these in order
OnTrigger
sniper_1
SweepTargetHighestPriority
shoot_me (param override)
the sniper will now shoot these targets. goto add new output and set the sniper back to normal.
OnTrigger
trig_multi
Toggle
sets the sniper back into sweep mod from original trigger.
I have not worked out every possible bug and I do not understand everything about the sniper. I know this works like it's suppose to as I figured it out by looking at the code of the original d1_town_05. there was alot to look at and sift through so I might have missed some things.
If you want my sample map. my e-mail is
[email protected]
I will only mail these back until Dec 31 2004 thats a saturday.