/*QUAKED worldspawn (0 0 0) ?
Enhanced worldspawn entity for use with Paintball2.

"sky" "sky name"
Valid sky names are:
unit1_ = Orange sunset sky
pbsky1 = cloudy sky
pbsky2 = sky with sun
pbsky3 = starry sky
pbsky4 = bright sunrise by hills
riverscape1 = mountains & river
arctic1 = snowy mountains and ocean

"maxteams" "#" - # is the max number of teams supported in the map, between 2 and 4.

"team#" "color" - This defines the color for the different teams, between 1 and 4.  Valid colors are "red", "blue", "yellow", and 

"purple".
Example:
  "maxteams" "2"
  "team1" "red"
  "team2" "blue"

"gamemode" "#" - # options:
0     All modes (default)
1     Deathmatch 
2     Single flag 
4     2 or more flag mode (flag in base) 
8     Siege 
16    KOTH
64    Pong!

Add the options together for multiple modes (1-flag and 2-flag mode would be 8 (2 + 4)).
"gamemode" can be applied to any entity.

When using ArghRad (http://www.planetquake.com/arghrad/)
you can use a sun to light maps with sky.
These settings work well with the riverscape1 sky:
"_sun_angle" "200 -30"
"_sun_diffuse" "60"
"_sun_ambient" "30"
"_sun_light" "250"

"forcejail" "1" - forces eliminated players into jail spawns (no observer/ghosts)

"minclientbuild" "#" - minimum version a client must have to play the map (useful if you use advanced features).

"requiredfiles" "path/to/file1 path/to/file2" - additional files required by the map (such as scripts) that do not download by 

default.  Always use the forward slash.  Keep filenames lowercase.

Example:
  "requiredfiles" "scripts/maps/mymap.txt"

Visit http://www.planetquake.com/digitalpaint/ or digitalpaint.org for more info.
*/

/*QUAKED trigger_multiple (.5 .5 .5) ? MONSTER NOT_PLAYER TRIGGERED
Variable sized repeatable trigger.  Must be targeted at one or more
entities.
If "delay" is set, the trigger waits some time after activating before
firing.
"wait" : Seconds between triggerings. (.2 default)
sounds
1) secret
2) beep beep
3) large switch
4)
set "message" to text string
*/

/*QUAKED base (.5 .5 .5) ?
Base trigger.  A player must touch this while holding the flag to get points.

"teamnumber" "#" Sets the team which can bring a captured flag to this base.

"count" "#"	Multiplier for points. ".2" = 1 point for cap. "1" = 5 points for cap.
*/

/*QUAKED hill (.5 .5 .5) ?
Hill for KOTH mode.  When a player touches the hill, their team gets points.  A flag with no teamnumber is also suggested, so that it's easy to tell if somebody is on the hill (players can also get points by touching the flag itself).

"gamemode" "16" - should always be 16 (KOTH only).
*/

/*QUAKED func_teamwall (.5 .5 .5) ?
Wall that exists only when the team is not playing

"teamnumber" "#" Sets the team.
*/

/*QUAKED func_dsm (0 .5 .8) ? INVERT_BEHAVIOR
Dynamically Sizing Map entity.  Apply this to brushes to seal off/open areas depending on the number of players present.

"open_pcount_all" "#"  If # or more players are in the game, the entity will disappear, opening a new path.
"close_pcount_all" "#" If # or fewer players are present, the entity will reappear and close off the path.
"spawnflags" "1" inverts the behavior so areas close off instead of open up when more players are present.
*/

/*QUAKED info_player_deathmatch (1 0 1) (-16 -16 -24) (16 16 40)
Spawning spot for players.

"teamnumber" "#" Sets which team will spawn at this point.
values:
0      = Spawn point for ANY team
1 to 4 = Team spawn points

"jail" "1"
makes it a jail spawn for eliminated players

"GiveGun" "type"
Starts the player with this gun instead of the pgp
"GiveHopper" "type"
starts the player with this hopper
"GiveAmmo" "type"
starts the player with this ammo
"GiveBarrel" "type"
starts the player with this barrel
"GiveCO2" "type"
starts the player with this CO2
"LoadedCO2" "type"
starts the player with this CO2 already loaded
NOTE: see weapon_pballgun, item_pballhopper, etc for
the different "types" that can be used
*/

/*QUAKED func_model (.5 1 0) (-8 -8 -8) (8 8 8)
Places a model in the map.  Not affected by gravity.

"model" "path/model" sets what model to use.
*/

/*QUAKED item_pballgrenade (.3 1 .6) (-16 -16 -16) (16 16 16)
"type" "type of grenade"
Grenade types are "smoke" or "paint"
If no type is specified, 
the grenade will be random.

"teamnumber" "#" 
for team-spacific grenades

"angle" "-1"
makes the grenade spawn right where you
put it instead of in a random proximity

"count" "1"
always spawns grenades there in addition
to the number of grenades set by the server

"group" "###"
Grenades that have the same group number will be the same.
*/

/*QUAKED weapon_pballgun (.3 .3 1) (-16 -16 -16) (16 16 16)
"type" "type of gun"
Gun types can be in powers or a spacific weapons:
| low | medium | high | trracer | stingray | vm68 | carbine | spyder | autococker | automag |
If no type is specified, the gun will be random.

"group" "###"
Guns that have the same group number will be the same.
*/

/*QUAKED item_pballhopper (.8 0 .8) (-16 -16 -16) (16 16 16)
Hopper Upgrade.

"type" "type of hopper"
Valid hopper types are 100 or 200.

"group" "###"
Hoppers with the same group number will be the same.
*/

/*QUAKED item_pballammo (.8 .5 .1) (-16 -16 -16) (16 16 16)
Box of paintballs.

"type" "size"
Valid sizes are:
| small | medium | large | 25 | 50 | 100 | 150 | 200 |
small = random of 25,50,100
medium = random of 50,100,150
large = random of 100,150,200
With large maps, you might need to add a small number of large ammo boxes to keep the entity count down.
*/

/*QUAKED item_pballco2 (.8 0 0) (-16 -16 -16) (16 16 16)
CO2 Canisters.

"type" "type of co2"
Valid CO2 types are:
| small | medium | large | 12g | 7oz | 12oz | 20oz |
small = random of 12g,7oz
medium = random of 7oz,12oz
large = random of 12oz,20oz
*/

/*QUAKED item_pballbarrel (.8 .8 0) (-16 -16 -16) (16 16 16)
Barrel Upgrade.

"type" "type of barrel"
Valid barrel types are:
| brass | chrome | steel |
*/

/*QUAKED item_score (0 1 1) (-8 -16 -16) (8 16 48)
same thing as "flag"
*/

/*QUAKED flag (0 1 1) (-8 -16 -16) (8 16 48)
"teamnumber" "#"
#=Number from 1-4 that indicates the team's flag.  A player can pick up any flag but their own color.
"0" is a white flag that ANY team can pick it up (used in 1-flag mode).

"count" "#"
Flag multiplier - It is multiplied by 5 to get the value of the flag.
Example
  "count" ".2"
  This will make the flag worth 1 point instead of 5.

"model" "path/modelname"
Used to set the flag model (if different from the standard flag model).

"skin" "#"
Sets the skin number to use when using the "model" key.
*/

/*QUAKED func_group (0 0 0) ?
Used to group brushes together just for editor convenience.
*/

/*QUAKED func_areaportal (0 0 0) ?
This is a non-visible object that divides the world into
areas that are seperated when this portal is not activated.
Usually enclosed in the middle of a door.
*/

/*QUAKED path_corner (.5 .3 0) (-8 -8 -8) (8 8 8) TELEPORT
Target: next path corner
Pathtarget: gets used when an entity that has
 this path_corner targeted touches it
*/

/*QUAKED info_null (0 0.5 0) (-4 -4 -4) (4 4 4)
Used as a positional target for spotlights, etc.
*/

/*QUAKED info_notnull (0 0.5 0) (-4 -4 -4) (4 4 4)
Used as a positional target jump pads (trigger_push), etc.
*/

/*QUAKED light (0 1 0) (-8 -8 -8) (8 8 8) START_OFF
Non-displayed light.
Default light value is 300.
Default style is 0.
If targeted, will toggle between on and off.
Default _cone value is 10 (used to set size of light for spotlights)
*/

/*QUAKED func_wall (0 .5 .8) ? TRIGGER_SPAWN TOGGLE START_ON ANIMATED ANIMATED_FAST
This is just a solid wall if not inhibited
TRIGGER_SPAWN the wall will not be present until triggered
    it will then blink in to existance; it will
    kill anything that was in it's way
TOGGLE   only valid for TRIGGER_SPAWN walls
    this allows the wall to be turned on and off
START_ON  only valid for TRIGGER_SPAWN walls
    the wall will initially be present
*/

/*QUAKED func_object (0 .5 .8) ? TRIGGER_SPAWN ANIMATED ANIMATED_FAST
This is solid bmodel that will fall if it's support is removed.
*/

/*QUAKED target_character (0 0 1) ?
used with target_string (must be on same "team")
"count" is position in the string (starts at 1)
*/

/*QUAKED target_string (0 0 1) (-8 -8 -8) (8 8 8)
*/

/*QUAKED func_clock (0 0 1) (-8 -8 -8) (8 8 8) TIMER_UP TIMER_DOWN START_OFF MULTI_USE
target a target_string with this
The default is to be a time of day clock
TIMER_UP and TIMER_DOWN run for "count" seconds and the fire "pathtarget"
If START_OFF, this entity must be used before it starts
"style"  0 "xx"
   1 "xx:xx"
   2 "xx:xx:xx"
*/

/*QUAKED misc_teleporter (1 0 0) (-32 -32 -24) (32 32 -16)
Stepping onto this disc will teleport players to the targeted
misc_teleporter_dest object.
*/

/*QUAKED misc_teleporter_dest (1 0 0) (-32 -32 -24) (32 32 -16)
Point teleporters at these.
*/

/*QUAKED target_temp_entity (1 0 0) (-8 -8 -8) (8 8 8)
Fire an origin based temp entity event to the clients.
"style"  type byte
*/

/*QUAKED target_speaker (1 0 0) (-8 -8 -8) (8 8 8) looped-on looped-off reliable
"noise"  wav file to play
"attenuation"
-1 = none, send to whole level
1 = normal fighting sounds
2 = idle sound level
3 = ambient sound level
"volume" 0.0 to 1.0
Normal sounds play each time the target is used.  The reliable flag can be
set for crucial voiceovers.
Looped sounds are allways atten 3 / vol 1, and the use function toggles it
on/off.
Multiple identical looping sounds will just increase volume without any
speed cost.
*/

/*QUAKED target_changelevel (1 0 0) (-8 -8 -8) (8 8 8)
Changes level to "map" when fired
*/

/*QUAKED target_splash (1 0 0) (-8 -8 -8) (8 8 8)
Creates a particle splash effect when used.
Set "sounds" to one of the following:
  1) sparks
  2) blue water
  3) brown water
  4) slime
  5) lava
  6) blood
"count" how many pixels in the splash
"dmg" if set, does a radius damage at this location when it splashes
  useful for lava/sparks
*/

/*QUAKED target_spawner (1 0 0) (-8 -8 -8) (8 8 8)
Set target to the type of entity you want spawned.
Useful for spawning monsters and gibs in the factory levels.
For monsters:
 Set direction to the facing you want it to have.
For gibs:
 Set direction if you want it moving and
 speed how fast it should be moving otherwise it
 will just be dropped
*/

/*QUAKED target_laser (0 .5 .8) (-8 -8 -8) (8 8 8) START_ON RED GREEN BLUE YELLOW ORANGE FAT
When triggered, fires a laser.  You can either set a target
or a direction.
*/

/*QUAKED target_lightramp (0 .5 .8) (-8 -8 -8) (8 8 8) TOGGLE
speed  How many seconds the ramping will take
message  two letters; starting lightlevel and ending lightlevel
*/

/*QUAKED trigger_once (.5 .5 .5) ? x x TRIGGERED
Triggers once, then removes itself.
You must set the key "target" to the name of another object in the level
that has a matching "targetname".
If TRIGGERED, this trigger must be triggered before it is live.
sounds
 1) secret
 2) beep beep
 3) large switch
 4)
"message" string to be displayed when triggered
*/

/*QUAKED trigger_relay (.5 .5 .5) (-8 -8 -8) (8 8 8)
This fixed size trigger cannot be touched, it can only be fired by other
events.
*/

/*QUAKED trigger_counter (.5 .5 .5) ? nomessage
Acts as an intermediary for an action that takes multiple inputs.
If nomessage is not set, it will print "1 more.. " etc when triggered and
"sequence complete" when finished.
After the counter has been triggered "count" times (default 2), it will fire
all of it's targets and remove itself.
*/

/*QUAKED trigger_always (.5 .5 .5) (-8 -8 -8) (8 8 8)
This trigger will always fire.  It is activated by the world.
*/

/*QUAKED trigger_push (.5 .5 .5) ? PUSH_ONCE PUSH_ALL
Pushes players and grenades so they will hit "target"
(exactly like Quake3 trigger_pushes - jump pads)

If PUSH_ALL is checked, it affects ALL entities (paint, guns, etc)
PUSH_ONCE causes the trigger_push to be removed after the first touch
*/

/*QUAKED trigger_hurt (.5 .5 .5) ? START_OFF TOGGLE SILENT NO_PROTECTION SLOW
Any entity that touches this will be hurt.
It does dmg points of damage each server frame
SILENT   supresses playing the sound
SLOW   changes the damage rate to once per second
NO_PROTECTION *nothing* stops the damage
"dmg"   default 5 (whole numbers only)
*/

/*QUAKED trigger_gravity (.5 .5 .5) ?
Changes the touching entites gravity to the value of "gravity".  1.0 is standard gravity for the level. Unfortunately this does not work for players.
*/

/*QUAKED func_getoutofjail (.5 .5 .5) ?
Turns an eleminated player into a living player when touched.

"noise" - .wav file to play
*/

/*QUAKED info_player_start (1 0 0) (-16 -16 -24) (16 16 40)
Starting point for single player, which isn't really 
applicable here - players will spawn here if there are
no info_player_deathmatches
*/

/*QUAKED info_player_intermission (1 0 1) (-16 -16 -24) (16 16 40)
The deathmatch intermission point will be at one of these
Use 'angles' instead of 'angle', so you can set pitch or roll as well as
yaw.  'pitch yaw roll'
*/

/*QUAKED func_door (0 .5 .8) ? START_OPEN x CRUSHER NOMONSTER ANIMATED TOGGLE ANIMATED_FAST
TOGGLE  wait in both the start and end states for a trigger event.
START_OPEN the door to moves to its destination when spawned, and operate in
reverse.  It is used to temporarily or permanently close off an area when
triggered (not useful for touch or takedamage doors).
NOMONSTER monsters will not trigger this door
"message" is printed when the door is touched if it is a trigger door and it
hasn't been fired yet
"angle"  determines the opening direction
"targetname" if set, no touch field will be spawned and a remote button or
trigger field activates the door.
"health" if set, door must be shot open
"speed"  movement speed (100 default)
"wait"  wait before returning (3 default, -1 = never return)
"lip"  lip remaining at end of move (8 default)
"dmg"  damage to inflict when blocked (2 default)
"sounds"
1) silent
2) light
3) medium
4) heavy
*/

/*QUAKED func_door_rotating (0 .5 .8) ? START_OPEN REVERSE CRUSHER NOMONSTER ANIMATED TOGGLE X_AXIS Y_AXIS
TOGGLE causes the door to wait in both the start and end states for a trigger event.
START_OPEN the door to moves to its destination when spawned, and operate in
reverse.  It is used to temporarily or permanently close off an area when
triggered (not useful for touch or takedamage doors).
NOMONSTER monsters will not trigger this door
You need to have an origin brush as part of this entity.  The center of that
brush will be
the point around which it is rotated. It will rotate around the Z axis by
default.  You can
check either the X_AXIS or Y_AXIS box to change that.
"distance" is how many degrees the door will be rotated.
"speed" determines how fast the door moves; default value is 100.
REVERSE will cause the door to rotate in the opposite direction.
"message" is printed when the door is touched if it is a trigger door and it
hasn't been fired yet
"angle"  determines the opening direction
"targetname" if set, no touch field will be spawned and a remote button or
trigger field activates the door.
"health" if set, door must be shot open
"speed"  movement speed (100 default)
"wait"  wait before returning (3 default, -1 = never return)
"dmg"  damage to inflict when blocked (2 default)
"sounds"
1) silent
2) light
3) medium
4) heavy
*/

/*QUAKED func_plat (0 .5 .8) ? PLAT_LOW_TRIGGER
speed	default 150
Plats are always drawn in the extended position, so they will light correctly.
If the plat is the target of another trigger or button, it will start out disabled in the extended position until it is trigger, 

when it will lower and become a normal plat.
"speed"	overrides default 200.
"accel" overrides default 500
"lip"	overrides default 8 pixel lip
If the "height" key is set, that will determine the amount the plat moves, instead of being implicitly determoveinfoned by the 

model's height.
Set "sounds" to one of the following:
1) base fast
2) chain slow
*/

/*QUAKED func_rotating (0 .5 .8) ? START_ON REVERSE X_AXIS Y_AXIS TOUCH_PAIN STOP ANIMATED ANIMATED_FAST
You need to have an origin brush as part of this entity.  The center of that brush will be
the point around which it is rotated. It will rotate around the Z axis by default.  You can
check either the X_AXIS or Y_AXIS box to change that.
"speed" determines how fast it moves; default value is 100.
"dmg"	damage to inflict when blocked (2 default)
REVERSE will cause the it to rotate in the opposite direction.
STOP mean it will stop moving instead of pushing entities
*/
/*QUAKED func_water (0 .5 .8) ? START_OPEN
func_water is a moveable water brush.  It must be targeted to operate.  Use
a non-water texture at your own risk.
START_OPEN causes the water to move to its destination when spawned and
operate in reverse.
"angle"  determines the opening direction (up or down only)
"speed"  movement speed (25 default)
"wait"  wait before returning (-1 default, -1 = TOGGLE)
"lip"  lip remaining at end of move (0 default)
"sounds" (yes, these need to be changed)
0) no sound
1) water
2) lava
*/

/*QUAKED func_train (0 .5 .8) ? START_ON TOGGLE BLOCK_STOPS
Trains are moving platforms that players can ride.
The targets origin specifies the min point of the train at each corner.
The train spawns at the first target it is pointing at.
If the train is the target of a button or trigger, it will not begin moving
until activated.
speed default 100
dmg  default 2
noise looping sound to play when the train is in motion
*/

/*QUAKED trigger_elevator (0.3 0.1 0.6) (-8 -8 -8) (8 8 8)
Entity to make a func_train behave like an elevator.
"targetname" set a func_button on a floor to point to this.
"target" targetname of the func_train elevator.

Place path_corner's at each floor, and set the func_button at that floor to "target" the trigger_elevator and "pathtarget" the path_corner.

See http://www.gamedesign.net/node/38 for a tutorial.
*/

/*QUAKED func_timer (0.3 0.1 0.6) (-8 -8 -8) (8 8 8) START_ON
"wait"   base time between triggering all targets, default is 1
"random"  wait variance, default is 0
so, the basic time between firing is a random time between
(wait - random) and (wait + random)
"delay"   delay before first firing when turned on, default is 0
"pausetime"  additional delay used only the very first time
    and only if spawned with START_ON
These can used but not touched.
*/

/*QUAKED func_conveyor (0 .5 .8) ? START_ON TOGGLE
Conveyors are stationary brushes that move what's on them.
The brush should be have a surface with at least one current content
enabled.
speed default 100
*/

/*QUAKED func_door_secret (0 .5 .8) ? always_shoot 1st_left 1st_down
A secret door.  Slide back and then to the side.
open_once  doors never closes
1st_left  1st move is left of arrow
1st_down  1st move is down from arrow
always_shoot door is shootebale even if targeted
"angle"  determines the direction
"dmg"  damage to inflic when blocked (default 2)
"wait"  how long to hold in the open position (default 5, -1 means hold)
*/

/*QUAKED func_button (0 .5 .8) ?
When a button is touched, it moves some distance in the direction of it's angle, triggers all of it's targets, waits some time, 

then returns to it's original position where it can be triggered again.

"angle"		determines the opening direction
"target"	all entities with a matching targetname will be used
"speed"		override the default 40 speed
"wait"		override the default 1 second wait (-1 = never return)
"lip"		override the default 4 pixel lip remaining at end of move
"health"	if set, the button must be killed instead of touched
"sounds"
1) silent
2) steam metal
3) wooden clunk
4) metallic click
5) in-out
*/
