Skip to content

Commit 0c3c37c

Browse files
authored
Rocket Turret Improvements (#336)
1 parent d0b6515 commit 0c3c37c

2 files changed

Lines changed: 39 additions & 6 deletions

File tree

fgd/point/npc/npc_portal_turret_floor.fgd

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@
3636
usedasactor(boolean) : "Used As Actor" : 0 : "Turret will not run the standard floor turret code so it can be used as an actor."
3737
pickupenabled(boolean) : "Turret Pickup Allowed" : 1 : "Disables pickup by player."
3838
disablemotion(boolean) : "Disable Motion" : 0 : "Set for turrets that can't move in the world."
39-
allowshootthroughportals(boolean) : "Allow Shooting Through Portals" : 0 : "Turrets will not try to shoot through portals unless this is set."
39+
AllowShootThroughPortals[engine](integer): "Shooting Through Portals": 0
40+
AllowShootThroughPortals(choices): "Shooting Through Portals" : 0 : "Determines which enemies the turret will shoot at through portals." =
41+
[
42+
0: "Disabled"
43+
1: "Players Only"
44+
2: "Players + NPCs"
45+
]
4046
turretrange(float) : "Maximum Range" : 1024 : "How far the turret will be able to see targets."
4147
loadalternativemodels(boolean) : "Load Defective Models" : 0 : "Should this turret precache the defective models? Needed for late switching."
4248
usesuperdamagescale(boolean) : "Use Super Damage" : 0 : "Setting this to true will scale the turret's damage by a very large amount."

fgd/point/npc/npc_rocket_turret.fgd

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
@PointClass base(BaseNPC, ResponseContext)
2-
studioprop() line(0 0 255, targetname, TripwireAimTarget)
2+
studioprop()
3+
line(0 0 255, targetname, TripwireAimTarget)
4+
line(128 128 128, targetname, TripwireFilter)
35
appliesto(P2CE)
46
sphere(turretrange)
57
= npc_rocket_turret: "Aims a rocket at a target."
@@ -13,22 +15,47 @@
1315
rocketlifetime(float) : "Rocket Lifetime" : 20 : "The rocket will automatically detonate after this number of seconds."
1416
FireCooldown(float) : "Fire Cooldown" : 4 : "The time it takes for the rocket turret to reset after firing a rocket."
1517
LockonTime(float) : "Lockon Time" : 1.5 : "The time it takes for the rocket turret to fire a rocket after locking onto a target."
18+
LockonSound(sound): "Lockon Sound" : "RocketTurret.LockonBeep" : "The sound played when locking onto a target."
19+
AcquireEnemies(boolean) : "Acquire Enemies" : 0 : "If enabled, the turret will automatically find enemies with a HATE relationship."
20+
AllowShootThroughPortals[engine](integer): "Shooting Through Portals": 0
21+
AllowShootThroughPortals(choices): "Shooting Through Portals" : 0 : "Determines which enemies the turret will shoot at through portals." =
22+
[
23+
0: "Disabled"
24+
1: "Players Only"
25+
2: "Players + NPCs"
26+
]
27+
1628
TripwireMode(boolean) : "Tripwire Mode" : 0 : "Makes the turret aim in a specific direction instead of following the target. When the beam is crossed, a rocket instantly fires."
1729
TripwireAimTarget(target_destination) : "Tripwire Aim Target" : : "In tripwire mode, the entity to aim at."
18-
model(studio) : "Model" : "models/props_bts/rocket_sentry.mdl" : "Model to use in-game"
30+
TripwireFilter(filterclass) : "Tripwire Filter" : : "If set, overrides which entities trigger rockets in tripwire mode. For normal mode, use an ai_relationship and 'Acquire Enemies'."
31+
model(studio) : "Model" : "models/props_bts/rocket_sentry.mdl" : "Model to use for the turret."
32+
33+
beamcolor(color255) : "Beam Color" : "100 100 255 100" : "The color and brightness of the laser beam and glow sprite. The default beam material is not tintable."
34+
beammaterial(sprite) : "Beam Material" : "effects/bluelaser1.vmt" : "Material to use for the laser beam."
35+
glowmaterial(sprite) : "Glow Material" : "sprites/light_glow03.vmt" : "Material to use for the glow sprite at the end of the laser beam."
1936

2037
turretrange(float) : "Maximum Range" : 8192 : "How far the turret will be able to see targets."
2138

2239
// Inputs
2340
input Toggle(void) : "Toggles between activated and deactivated states."
24-
input Enable(void) : "Activate Rocket Turret, and allow it to begin scanning."
25-
input Disable(void) : "Deactivate and retract the Rocket Turret."
26-
input SetTarget(target_destination) : "Sets the target for this turret to attack."
41+
input Enable(void) : "Activate the rocket turret, and allow it to begin scanning."
42+
input Disable(void) : "Deactivate and retract the rocket turret."
43+
input SetTarget(target_destination) : "Sets the target for this turret to attack. The turret will ignore everything else until a new target is given."
44+
input SetAutoTarget(void) : "Allow this turret to automatically find enemies."
2745
input Destroy(void) : "Sets this turret to it's destroyed state."
2846
input ForceFire(void) : "Makes the turret immediately fire a rocket where it is pointing."
47+
input SetTripwireTarget(target_destination) : "Set the aim target for tripwire mode."
48+
input SetTripwireFilter(filterclass) : "Set the filter to determine which entities trigger the tripwire. Pass nothing to revert to default."
49+
input ToggleTripwire(void) : "Toggle tripwire mode on and off."
50+
input EnableTripwire(void) : "Enable tripwire mode."
51+
input DisableTripwire(void) : "Disable tripwire mode."
2952

3053
// Outputs
3154
output OnFoundTarget(void) : "Fired when the rocket turret finds an unobstructed target."
3255
output OnLostTarget(void) : "Fired when turret's target is blocked."
3356
output OnDeath(void) : "Fired after this turret finishes it's destroy think and begins it's death think."
57+
output OnTripped(void): "Fired when the beam intersects an enemy, and is either locking on or immediately firing for tripwire mode. The target is passed as !activator."
58+
output OnRocketFired(void): "Triggers when a rocket is fired, passing the rocket as !activator."
59+
output OnRocketFizzled(void): "Triggers when a rocket hits a fizzler, or the turret itself."
60+
output OnRocketExploded(void): "Triggers when a rocket impacts something."
3461
]

0 commit comments

Comments
 (0)