Merge pull request #16 from BClark09/master
Added ability to disable bosses using logic_classunlock
This commit is contained in:
commit
af45b502a0
2 changed files with 260 additions and 212 deletions
|
@ -2,6 +2,7 @@ ENT.Type = "point"
|
|||
|
||||
function ENT:Initialize()
|
||||
self.Class = self.Class or 1
|
||||
self.BossesEnabled = GAMEMODE.BossZombies
|
||||
end
|
||||
|
||||
function ENT:Think()
|
||||
|
@ -50,6 +51,8 @@ function ENT:AcceptInput(name, activator, caller, args)
|
|||
v.IsDefault = nil
|
||||
end
|
||||
end
|
||||
elseif name == "setbossesenabled" then
|
||||
self:KeyValue("BossesEnabled",args)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -57,6 +60,10 @@ function ENT:KeyValue(key, value)
|
|||
key = string.lower(key)
|
||||
if key == "class" then
|
||||
self.Class = value or self.Class
|
||||
elseif key == "bossesenabled" then
|
||||
local enabled = tonumber(value) == 1
|
||||
self.BossesEnabled = enabled
|
||||
GAMEMODE.BossZombies = enabled
|
||||
elseif string.sub(key, 1, 2) == "on" then
|
||||
self:AddOnOutput(key, value)
|
||||
end
|
||||
|
|
|
@ -1,23 +1,26 @@
|
|||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// NoXiousNet Zombie Survival FGD - Last Edit by Benjy (29th October 2014) //
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
// NoXiousNet Zombie Survival FGD - Last Edit by Benjy (10th November 2014) //
|
||||
// If there are any bugs with this file, or any additions that need to be made //
|
||||
// make a post at: http://www.noxiousnet.com/forums/index.php?topic=14910 //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@include "base.fgd"
|
||||
@include "halflife2.fgd"
|
||||
@include "hl2mp.fgd"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Gamemode - Brush Entities //////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
// Gamemode - Brush Entities /////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
@SolidClass base(Targetname) = func_noair : "ZS: Anyone inside this brush requires air"
|
||||
[
|
||||
// Keys
|
||||
enabled(choices) : "Enabled" : 0 : "Enable the brush entity." =
|
||||
[
|
||||
1 : "Yes"
|
||||
0 : "No"
|
||||
]
|
||||
|
||||
// Inputs
|
||||
input enable(void) : "Enable the entity."
|
||||
input disable(void) : "Disable the entity."
|
||||
input toggle(void) : "Toggle the entity."
|
||||
|
@ -25,6 +28,7 @@
|
|||
|
||||
@SolidClass base(Targetname) = trigger_zombieclass : "ZS: You can directly control the changing of classes with this."
|
||||
[
|
||||
// Keys
|
||||
enabled(choices) : "Enabled" : 0 : "Enable the brush entity." =
|
||||
[
|
||||
1 : "Yes"
|
||||
|
@ -52,7 +56,7 @@
|
|||
"chem zombie" : "Chem Zombie"
|
||||
"nightmare" : "Nightmare"
|
||||
"puke pus" : "Puke Pus"
|
||||
"the tickle monster": "The Tickle Monster"
|
||||
"the tickle monster" : "The Tickle Monster"
|
||||
"shade" : "Shade"
|
||||
"bonemesh" : "Bonemesh"
|
||||
"the butcher" : "The Butcher"
|
||||
|
@ -82,7 +86,7 @@
|
|||
"chem zombie" : "Chem Zombie"
|
||||
"nightmare" : "Nightmare"
|
||||
"puke pus" : "Puke Pus"
|
||||
"the tickle monster": "The Tickle Monster"
|
||||
"the tickle monster" : "The Tickle Monster"
|
||||
"shade" : "Shade"
|
||||
"bonemesh" : "Bonemesh"
|
||||
"the butcher" : "The Butcher"
|
||||
|
@ -90,7 +94,7 @@
|
|||
"gore child" : "Gore Child"
|
||||
"giga gore child" : "Giga Gore Child"
|
||||
]
|
||||
touchdeathclass(choices): "On Touch Respawn Class" : "zombie" : "Any living zombie touching the brush will be set to this class name on death." =
|
||||
touchdeathclass(choices) : "On Touch Respawn Class" : "zombie" : "Any living zombie touching the brush will be set to this class name on death." =
|
||||
[
|
||||
"crow" : "Crow"
|
||||
"will o' wisp" : "Will O' Wisp"
|
||||
|
@ -112,7 +116,7 @@
|
|||
"chem zombie" : "Chem Zombie"
|
||||
"nightmare" : "Nightmare"
|
||||
"puke pus" : "Puke Pus"
|
||||
"the tickle monster": "The Tickle Monster"
|
||||
"the tickle monster" : "The Tickle Monster"
|
||||
"shade" : "Shade"
|
||||
"bonemesh" : "Bonemesh"
|
||||
"the butcher" : "The Butcher"
|
||||
|
@ -142,7 +146,7 @@
|
|||
"chem zombie" : "Chem Zombie"
|
||||
"nightmare" : "Nightmare"
|
||||
"puke pus" : "Puke Pus"
|
||||
"the tickle monster": "The Tickle Monster"
|
||||
"the tickle monster" : "The Tickle Monster"
|
||||
"shade" : "Shade"
|
||||
"bonemesh" : "Bonemesh"
|
||||
"the butcher" : "The Butcher"
|
||||
|
@ -160,6 +164,7 @@
|
|||
1 : "Yes"
|
||||
0 : "No"
|
||||
]
|
||||
|
||||
// Inputs
|
||||
input enable(void) : "Enable the entity."
|
||||
input disable(void) : "Disable the entity."
|
||||
|
@ -174,23 +179,23 @@
|
|||
|
||||
@SolidClass base(Targetname) = trigger_bossclass : "ZS: A zombie that touches this brush"
|
||||
[
|
||||
// Keys
|
||||
enabled(choices) : "Enabled" : 0 : "Enable the brush entity." =
|
||||
[
|
||||
1 : "Yes"
|
||||
0 : "No"
|
||||
]
|
||||
|
||||
silent(choices) : "Silent" : 0 : "If yes then then the server does not announce that a player has become the new boss." =
|
||||
[
|
||||
1 : "Yes"
|
||||
0 : "No"
|
||||
]
|
||||
|
||||
instantchange(choices) : "Change Instantly?" : 1 : "If yes then anyone who gets swapped will instantly be changed right on the spot." =
|
||||
[
|
||||
1 : "Yes"
|
||||
0 : "No"
|
||||
]
|
||||
|
||||
// Inputs
|
||||
input enable(void) : "Enable the entity."
|
||||
input disable(void) : "Disable the entity."
|
||||
|
@ -198,6 +203,7 @@
|
|||
input setsilent(integer) : "Set Silent keyvalue. <boolean>"
|
||||
input setinstantchange(integer) : "Set Change Instantly keyvalue. <boolean>"
|
||||
input spawnboss(void) : "Spawns the boss using the zombie with the highest score"
|
||||
|
||||
// Outputs
|
||||
output OnBossTouched(void) : "Set when a boss starts touching the brush. Is not fired when a zombie becomes a boss in this volume."
|
||||
]
|
||||
|
@ -208,11 +214,13 @@
|
|||
|
||||
@BaseClass base(Targetname) = ZSSpawn
|
||||
[
|
||||
// Keys
|
||||
disabled(choices) : "Disabled" : 0 : "If disabled, players cannot spawn here." =
|
||||
[
|
||||
1 : "Yes"
|
||||
0 : "No"
|
||||
]
|
||||
|
||||
// Inputs
|
||||
input enable(void) : "Enable the spawn point."
|
||||
input disable(void) : "Disable the spawn point."
|
||||
|
@ -237,24 +245,27 @@
|
|||
|
||||
@PointClass base(Targetname) = logic_beats : "ZS: Allows you to turn beats (the ambient music) on or off."
|
||||
[
|
||||
// Keys
|
||||
enabled(choices) : "Enabled" : 1 : "Allows ZS beats" =
|
||||
[
|
||||
1 : "Yes"
|
||||
0 : "No"
|
||||
]
|
||||
|
||||
// Inputs
|
||||
input enable(void) : "Enables beats."
|
||||
input disable(void) : "Disables beats."
|
||||
// Outputs
|
||||
]
|
||||
|
||||
@PointClass base(Targetname) = logic_dynamicspawning : "ZS: Allows you to control dynamic spawning."
|
||||
[
|
||||
// Keys
|
||||
enabled(choices) : "Enabled" : 1 : "Should dynamic spawning be on?" =
|
||||
[
|
||||
1 : "Yes"
|
||||
0 : "No"
|
||||
]
|
||||
|
||||
// Inputs
|
||||
input enable(void) : "Enable dynamic spawning."
|
||||
input disable(void) : "Disable dynamic spawning."
|
||||
|
@ -262,12 +273,15 @@
|
|||
|
||||
@PointClass base(Origin) iconsprite("particles/smokey") sphere( radius ) = zombiegasses : "ZS: Manually place a point for the zombies' noxious gases."
|
||||
[
|
||||
// Keys
|
||||
radius(integer) : "Radius" : 250 : "Radius that this can damage humans/heal zombies."
|
||||
]
|
||||
|
||||
@PointClass base(Targetname) = logic_pickupdrop : "ZS: Controls events when players pickup or drop things."
|
||||
[
|
||||
// Keys
|
||||
EntityToWatch(target_destination) : "Entity to Watch" : " " : "Name of the entity to watch (for outputs)."
|
||||
|
||||
// Inputs
|
||||
input ForceDrop(string) : "Forces the dropping of something that's picked up by a human."
|
||||
input DisablePickup(string) : "Disables human pickups for the specified entity. Does not force dropping if currently carried, use the above input."
|
||||
|
@ -322,14 +336,18 @@
|
|||
|
||||
@PointClass base(Targetname) = logic_startingloadout : "ZS: Allows you to control what people start with."
|
||||
[
|
||||
// Keys
|
||||
startingloadout(string) : "Starting Loadout" : "worth" : "Sets the starting load out for all new humans. This is a comma-separated list of entity classes which is then separated by colons. For example: weapon_zs_peashooter:1,weapon_zs_axe:1,item_ammo_pistol:2 would give everyone a peashooter, an axe, and spawn two boxes of pistol ammo on them. It also accepts none for absolutely no starting items and worth for using the worth menu (default)."
|
||||
|
||||
// Inputs
|
||||
input setstartingloadout(string) : "Sets the keyvalue"
|
||||
]
|
||||
|
||||
@PointClass base(Targetname) = logic_worth : "ZS: Allows you to control Worth."
|
||||
[
|
||||
// Keys
|
||||
startingworth(integer) : "Starting Worth" : 100 : "The amount of Worth to start with. Use 0 to disable Worth."
|
||||
|
||||
// Inputs
|
||||
input setstartingworth(integer) : "Sets the amount of worth to start with."
|
||||
]
|
||||
|
@ -350,6 +368,7 @@
|
|||
|
||||
@PointClass base(Targetname) = logic_pickups : "ZS: Allows you to control how much stuff people can pickup in the map. Only things placed by the mapper work with this system. Stuff from dead humans doesn't count."
|
||||
[
|
||||
// Keys
|
||||
maxweaponpickups(integer) : "Max Weapon Pickups" : 5 : "How many weapons a player can pickup from the map."
|
||||
maxammopickups(integer) : "Max Ammo Pickups" : 5 : "How many ammo boxes a player can pickup from the map."
|
||||
maxflashlightpickups(integer) : "Max Flashlight Pickups" : 5 : "How many flashlight batteries a player can pickup from the map."
|
||||
|
@ -358,6 +377,7 @@
|
|||
1 : "Yes"
|
||||
0 : "No"
|
||||
]
|
||||
|
||||
// Inputs
|
||||
input setmaxweaponpickups(integer) : "Set the number of weapons a player can pickup from the map."
|
||||
input setmaxammopickups(integer) : "Set the number of ammo boxes a player can pickup from the map."
|
||||
|
@ -367,16 +387,26 @@
|
|||
|
||||
@PointClass base(Targetname) = logic_classunlock : "ZS: Allows you to control class unlocks."
|
||||
[
|
||||
// Keys
|
||||
class(string) : "Class" : "zombie" : "Sets the name of the class to watch for any outputs."
|
||||
bossesenabled(choices) : "Enable Bosses" : 1 : "When enabled, bosses spawn at wave end as normal." =
|
||||
[
|
||||
1 : "Yes"
|
||||
0 : "No"
|
||||
]
|
||||
|
||||
// Inputs
|
||||
input unlockclass(string) : "Forces a class to be unlocked."
|
||||
input lockclass(string) : "Forces a class to be locked."
|
||||
input setbossesenabled(integer) : "Enables or disables boss zombies."
|
||||
|
||||
// Outputs
|
||||
output OnClassUnlocked(void) : "Called when the class we're watching's class is unlocked by the game. This output isn't called if the class is unlocked by any logic_classunlock entities, only by the game."
|
||||
]
|
||||
|
||||
@PointClass studio("models/crossbow_bolt.mdl") base(Targetname) = prop_nail : "ZS: Allows you to manually place nails."
|
||||
[
|
||||
// Keys
|
||||
healthoverride(integer) : "Health Override" : 210 : "Sets the nail's maximum health to a specific number."
|
||||
healthmultiplier(float) : "Health Multiply" : 1 : "Multiply the nail's default maximum health by this number."
|
||||
unremovable(choices) : "Unremovable" : 0 : "Set to yes to make this nail unremovable by players." =
|
||||
|
@ -384,6 +414,8 @@
|
|||
1 : "Yes"
|
||||
0 : "No"
|
||||
]
|
||||
|
||||
// Inputs
|
||||
input sethealth(integer) : "Sets the nail's remaining health."
|
||||
input attachto(string) : "Parent to this entity."
|
||||
input nailto(string) : "Nail to this entity. Use attachto first and then this to weld the two. Use 'worldspawn' here to weld to the world."
|
||||
|
@ -394,6 +426,7 @@
|
|||
|
||||
@PointClass studio("models/Items/BoxMRounds.mdl") base(Targetname, Angles) = prop_ammo : "ZS: Game Specific Ammo."
|
||||
[
|
||||
// Keys
|
||||
ammotype(choices) : "Ammo Type" : "pistol" : "Ammo type this entity becomes" =
|
||||
[
|
||||
"pistol" : "Pistol"
|
||||
|
@ -414,13 +447,16 @@
|
|||
]
|
||||
amount(integer) : "Amount" : 0 : "Amount of ammo that collecting this item gives"
|
||||
]
|
||||
|
||||
@PointClass studio("models/weapons/w_irifle.mdl") base(Targetname, Angles) = prop_weapon : "ZS: Game Specific Weapon."
|
||||
[
|
||||
// Keys
|
||||
weapontype(string) : "weapon_type" : "weapon_zs_m4" : "Weapon type this entity becomes"
|
||||
]
|
||||
|
||||
@PointClass base(Targetname) sphere( range ) = point_worldhint : "ZS: Allows you to create 3D hints and information tags."
|
||||
[
|
||||
// Keys
|
||||
hint(string) : "Hint" : " " : "The hint to display."
|
||||
viewer(choices) : "Seen By" : 0 : "The team that can view us." =
|
||||
[
|
||||
|
@ -430,6 +466,7 @@
|
|||
"4" : "Humans"
|
||||
]
|
||||
range(integer) : "Range" : 0 : "The range from the player's camera we must be in to see this hint. It can also be 0 for infinite."
|
||||
|
||||
// Inputs
|
||||
input sethint(string) : "Sets the hint to display."
|
||||
input setviewer(integer) : "Sets the team that can view us. Use 0 for everyone, -1 for no one (inactive), 3 for zombie, and 4 for human."
|
||||
|
@ -438,22 +475,16 @@
|
|||
|
||||
@PointClass base(Targetname) = prop_playergib : "ZS: Allows you to manually place gibs."
|
||||
[
|
||||
// "models/gibs/HGIBS.mdl"
|
||||
// "models/gibs/HGIBS_spine.mdl"
|
||||
// "models/gibs/HGIBS_rib.mdl"
|
||||
// "models/gibs/HGIBS_scapula.mdl"
|
||||
// "models/gibs/antlion_gib_medium_2.mdl"
|
||||
// "models/gibs/Antlion_gib_Large_1.mdl"
|
||||
// "models/gibs/Strider_Gib4.mdl"
|
||||
// Keys
|
||||
gibtype(choices) : "Gib Type" : 1 : "Overrides the gib's type." =
|
||||
[
|
||||
1 : "Skull"
|
||||
2 : "Spine"
|
||||
3 : "Rib"
|
||||
4 : "Scapula"
|
||||
7 : "Small Chunk"
|
||||
5 : "Medium Chunk"
|
||||
6 : "Large Chunk"
|
||||
1 : "Skull" // "models/gibs/HGIBS.mdl"
|
||||
2 : "Spine" // "models/gibs/HGIBS_spine.mdl"
|
||||
3 : "Rib" // "models/gibs/HGIBS_rib.mdl"
|
||||
4 : "Scapula" // "models/gibs/HGIBS_scapula.mdl"
|
||||
7 : "Small Chunk" // "models/gibs/antlion_gib_medium_2.mdl"
|
||||
5 : "Medium Chunk" // "models/gibs/Antlion_gib_Large_1.mdl"
|
||||
6 : "Large Chunk" // "models/gibs/Strider_Gib4.mdl"
|
||||
]
|
||||
lifetime(integer) : "Lifetime" : 0 : "Overrides how long for this gib should live. 0 for never automatically remove."
|
||||
]
|
||||
|
@ -463,6 +494,7 @@
|
|||
// Inputs
|
||||
input win(void) : "Humans win the game, map over."
|
||||
input lose(void) : "Humans lose the game, map over."
|
||||
|
||||
// Outputs
|
||||
output onwin(void) : "Called when humans win even if not by this entity."
|
||||
output onlose(void) : "Called when humans lose even if not by this entity."
|
||||
|
@ -470,7 +502,9 @@
|
|||
|
||||
@PointClass base(Targetname) = logic_infliction : "ZS: Watches for the specified infliction level."
|
||||
[
|
||||
// Keys
|
||||
infliction(float) : "Infliction" : "0.5" : "Defines infliction to watch for (float between 0.0 - 1.0)."
|
||||
|
||||
// Outputs
|
||||
output OnInflictionReached(void) : "Called when the specified infliction level has been reached."
|
||||
output OnLastHuman(void) : "Called when there is one person alive. !caller and !activator are both the last human's entity."
|
||||
|
@ -478,7 +512,9 @@
|
|||
|
||||
@PointClass base(Targetname) = logic_waves : "ZS: Watches for the start of the specified wave."
|
||||
[
|
||||
// Keys
|
||||
wave(integer) : "Wave" : 1 : "Any On* outputs will watch for this wave. Use -1 for all waves."
|
||||
|
||||
// Inputs
|
||||
input AdvanceWave(void) : "Advances to the next wave and sets the wave to active."
|
||||
input EndWave(void) : "Sets the time that the wave ends to this very moment."
|
||||
|
@ -487,6 +523,7 @@
|
|||
input SetWaves(integer) : "Sets the total amount of waves to the number specified. Don't worry about class unlocks, the gamemode does not use the max waves value directly."
|
||||
input SetWaveStart(integer) : "Sets the time that the wave will start to TimeNow + <time>. You should use this instead of delayed entity inputs."
|
||||
input SetWaveEnd(integer) : "Sets the time that the wave will end to TimeNow + <time>. You should use this instead of delayed entity inputs."
|
||||
|
||||
// Outputs
|
||||
output OnWaveStart(void) : "Called when the specified wave has started."
|
||||
output OnWaveEnd(void) : "Called when the specified wave has ended."
|
||||
|
@ -494,6 +531,7 @@
|
|||
|
||||
@PointClass base(Targetname) = point_zsmessage : "ZS: Custom message that is displayed with the specified message."
|
||||
[
|
||||
// Keys
|
||||
team(choices) : "Team" : "all" : "Filter which team gets the message." =
|
||||
[
|
||||
"zombie" : "Zombies"
|
||||
|
@ -501,6 +539,8 @@
|
|||
"private" : "Activator Only"
|
||||
"all" : "All"
|
||||
]
|
||||
|
||||
// Inputs
|
||||
input message(string) : "What to display. Supports the markup library."
|
||||
input sethumanhudmessage(string) : "Set a message to display in the human wave hud."
|
||||
input setzombiehudmessage(string) : "Set a message to display in the zombie wave hud."
|
||||
|
@ -517,6 +557,7 @@
|
|||
|
||||
@PointClass base(Targetname) = info_gamehud : "ZS: Allows you to control a custom message that appears on the wave HUD for each team. Can be used to display objectives or other information."
|
||||
[
|
||||
// Keys
|
||||
message(string) : "Message" : " " : "The hint to display."
|
||||
viewer(choices) : "Seen By" : 0 : "The team that can view us." =
|
||||
[
|
||||
|
@ -525,12 +566,12 @@
|
|||
"3" : "Zombies"
|
||||
"4" : "Humans"
|
||||
]
|
||||
|
||||
// Inputs
|
||||
input setmessage(string) : "Sets the hint to display."
|
||||
input setviewer(integer) : "Sets the team that can view us. Use 0 for everyone, -1 for no one (inactive), 3 for zombie, and 4 for human."
|
||||
]
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Gamemode - Worth Weapons + Items ///////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -741,7 +782,7 @@
|
|||
"A hunting rifle that deals high amount of damage at the cost of slow reload speed. " []
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Gamemode - Crafting Weapons //|||||////////////////////////////////////////////
|
||||
// Gamemode - Crafting Weapons ////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@PointClass base(Weapon) studio("models/props_c17/oildrum001_explosive.mdl") = weapon_zs_megamasher : "Craftable Weapon.\n"+
|
||||
|
|
Loading…
Reference in a new issue