Skip to content

Instantly share code, notes, and snippets.

@samisalreadytaken
Last active December 30, 2022 16:52
Show Gist options
  • Select an option

  • Save samisalreadytaken/395eea7626bc6c75230c49a38c3f88c5 to your computer and use it in GitHub Desktop.

Select an option

Save samisalreadytaken/395eea7626bc6c75230c49a38c3f88c5 to your computer and use it in GitHub Desktop.
versioninfo
{
"editorversion" "400"
"editorbuild" "6440"
"mapversion" "1"
"formatversion" "100"
"prefab" "0"
}
visgroups
{
}
viewsettings
{
"bSnapToGrid" "1"
"bShowGrid" "1"
"bShowLogicalGrid" "0"
"nGridSpacing" "8"
"bShow3DGrid" "0"
}
world
{
"id" "1"
"mapversion" "22"
"classname" "worldspawn"
"chaptertitlenomessage" "1"
"detailmaterial" "detail/detailsprites"
"detailvbsp" "detail.vbsp"
"maxpropscreenwidth" "-1"
"skyname" "sky_day01_01"
"vscriptlanguage_client" "-2"
solid
{
"id" "6"
side
{
"id" "12"
"plane" "(-448 320 320) (448 320 320) (448 -320 320)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[1 0 0 0] 0.291667"
"vaxis" "[0 -1 0 0] 0.3125"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "11"
"plane" "(-448 320 320) (-448 -320 320) (-448 -320 -64)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[0 -1 0 0] 0.3125"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "10"
"plane" "(448 320 -64) (448 -320 -64) (448 -320 320)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[0 1 0 0] 0.3125"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "9"
"plane" "(448 320 320) (-448 320 320) (-448 320 -64)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[-1 0 0 0] 0.291667"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "8"
"plane" "(448 -320 -64) (-448 -320 -64) (-448 -320 320)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[1 0 0 0] 0.291667"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "7"
"plane" "(384 -256 256) (384 256 256) (-384 256 256)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[-1 0 0 0] 0.25"
"vaxis" "[0 -1 0 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
editor
{
"color" "220 220 220"
"groupid" "18"
"visgroupshown" "1"
"visgroupautoshown" "1"
}
}
solid
{
"id" "8"
side
{
"id" "18"
"plane" "(-448 -320 -64) (448 -320 -64) (448 320 -64)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[-1 0 0 0] 0.291667"
"vaxis" "[0 -1 0 0] 0.3125"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "17"
"plane" "(-448 320 320) (-448 -320 320) (-448 -320 -64)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[0 -1 0 0] 0.3125"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "16"
"plane" "(448 320 -64) (448 -320 -64) (448 -320 320)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[0 1 0 0] 0.3125"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "15"
"plane" "(448 320 320) (-448 320 320) (-448 320 -64)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[-1 0 0 0] 0.291667"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "14"
"plane" "(448 -320 -64) (-448 -320 -64) (-448 -320 320)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[1 0 0 0] 0.291667"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "13"
"plane" "(384 256 0) (384 -256 0) (-384 -256 0)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[1 0 0 0] 0.25"
"vaxis" "[0 -1 0 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
editor
{
"color" "220 220 220"
"groupid" "18"
"visgroupshown" "1"
"visgroupautoshown" "1"
}
}
solid
{
"id" "10"
side
{
"id" "24"
"plane" "(-448 320 320) (-448 -320 320) (-448 -320 -64)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[0 -1 0 0] 0.3125"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "23"
"plane" "(448 320 320) (-448 320 320) (-448 320 -64)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[-1 0 0 0] 0.291667"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "22"
"plane" "(448 -320 -64) (-448 -320 -64) (-448 -320 320)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[1 0 0 0] 0.291667"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "21"
"plane" "(-384 256 256) (384 256 256) (384 -256 256)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[1 0 0 0] 0.25"
"vaxis" "[0 -1 0 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "20"
"plane" "(-384 -256 0) (384 -256 0) (384 256 0)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[-1 0 0 0] 0.25"
"vaxis" "[0 -1 0 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "19"
"plane" "(-384 -256 0) (-384 -256 256) (-384 256 256)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[0 1 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
editor
{
"color" "220 220 220"
"groupid" "18"
"visgroupshown" "1"
"visgroupautoshown" "1"
}
}
solid
{
"id" "12"
side
{
"id" "30"
"plane" "(448 320 -64) (448 -320 -64) (448 -320 320)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[0 1 0 0] 0.3125"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "29"
"plane" "(448 320 320) (-448 320 320) (-448 320 -64)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[-1 0 0 0] 0.291667"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "28"
"plane" "(448 -320 -64) (-448 -320 -64) (-448 -320 320)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[1 0 0 0] 0.291667"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "27"
"plane" "(-384 256 256) (384 256 256) (384 -256 256)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[1 0 0 0] 0.25"
"vaxis" "[0 -1 0 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "26"
"plane" "(-384 -256 0) (384 -256 0) (384 256 0)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[-1 0 0 0] 0.25"
"vaxis" "[0 -1 0 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "25"
"plane" "(384 -256 256) (384 -256 0) (384 256 0)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[0 -1 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
editor
{
"color" "220 220 220"
"groupid" "18"
"visgroupshown" "1"
"visgroupautoshown" "1"
}
}
solid
{
"id" "14"
side
{
"id" "36"
"plane" "(448 320 320) (-448 320 320) (-448 320 -64)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[-1 0 0 0] 0.291667"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "35"
"plane" "(-384 256 256) (384 256 256) (384 -256 256)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[1 0 0 0] 0.25"
"vaxis" "[0 -1 0 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "34"
"plane" "(-384 -256 0) (384 -256 0) (384 256 0)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[-1 0 0 0] 0.25"
"vaxis" "[0 -1 0 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "33"
"plane" "(-384 256 256) (-384 -256 256) (-384 -256 0)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[0 -1 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "32"
"plane" "(384 256 0) (384 -256 0) (384 -256 256)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[0 1 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "31"
"plane" "(-384 256 0) (-384 256 256) (384 256 256)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[1 0 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
editor
{
"color" "220 220 220"
"groupid" "18"
"visgroupshown" "1"
"visgroupautoshown" "1"
}
}
solid
{
"id" "16"
side
{
"id" "42"
"plane" "(448 -320 -64) (-448 -320 -64) (-448 -320 320)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[1 0 0 0] 0.291667"
"vaxis" "[0 0 -1 -170.667] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "41"
"plane" "(-384 256 256) (384 256 256) (384 -256 256)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[1 0 0 0] 0.25"
"vaxis" "[0 -1 0 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "40"
"plane" "(-384 -256 0) (384 -256 0) (384 256 0)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[-1 0 0 0] 0.25"
"vaxis" "[0 -1 0 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "39"
"plane" "(-384 256 256) (-384 -256 256) (-384 -256 0)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[0 -1 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "38"
"plane" "(384 256 0) (384 -256 0) (384 -256 256)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[0 1 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "37"
"plane" "(-384 -256 256) (-384 -256 0) (384 -256 0)"
"material" "DEV/REFLECTIVITY_20"
"uaxis" "[-1 0 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
editor
{
"color" "220 220 220"
"groupid" "18"
"visgroupshown" "1"
"visgroupautoshown" "1"
}
}
group
{
"id" "18"
editor
{
"color" "220 220 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
}
}
}
entity
{
"id" "19"
"classname" "info_player_start"
"angles" "0 0 0"
"origin" "8 -32 9"
editor
{
"color" "0 255 0"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 1000]"
}
}
entity
{
"id" "84"
"classname" "func_button"
"disablereceiveshadows" "0"
"EFlags" "0"
"lip" "0"
"locked_sentence" "0"
"locked_sound" "0"
"movedir" "0 0 0"
"origin" "56 -72 24"
"renderamt" "255"
"rendercolor" "255 255 255"
"renderfx" "0"
"rendermode" "0"
"sounds" "0"
"spawnflags" "1025"
"speed" "5"
"unlocked_sentence" "0"
"unlocked_sound" "0"
"viewhideflags" "0"
"wait" "0.1"
connections
{
"OnPressed" "custom_game_text,CallScriptFunctionClient,DisplayMessage1,0,-1"
}
solid
{
"id" "85"
side
{
"id" "66"
"plane" "(48 -80 48) (48 -64 48) (64 -64 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[1 0 0 0] 0.25"
"vaxis" "[0 -1 0 -64] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "65"
"plane" "(48 -64 0) (48 -80 0) (64 -80 0)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[-1 0 0 0] 0.25"
"vaxis" "[0 -1 0 -64] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "64"
"plane" "(48 -80 0) (48 -64 0) (48 -64 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[0 -1 0 -64] 0.25"
"vaxis" "[0 0 -1 0] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "63"
"plane" "(64 -64 0) (64 -80 0) (64 -80 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[0 1 0 64] 0.25"
"vaxis" "[0 0 -1 0] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "62"
"plane" "(48 -64 0) (64 -64 0) (64 -64 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[-1 0 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "61"
"plane" "(64 -80 0) (48 -80 0) (48 -80 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[1 0 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
}
}
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 2500]"
}
}
entity
{
"id" "99"
"classname" "func_button"
"disablereceiveshadows" "0"
"EFlags" "0"
"lip" "0"
"locked_sentence" "0"
"locked_sound" "0"
"movedir" "0 0 0"
"origin" "56 -96 24"
"renderamt" "255"
"rendercolor" "255 255 255"
"renderfx" "0"
"rendermode" "0"
"sounds" "0"
"spawnflags" "1025"
"speed" "5"
"unlocked_sentence" "0"
"unlocked_sound" "0"
"viewhideflags" "0"
"wait" "0.1"
connections
{
"OnPressed" "custom_game_text,CallScriptFunctionClient,DisplayMessage2,0,-1"
}
solid
{
"id" "100"
side
{
"id" "78"
"plane" "(48 -104 48) (48 -88 48) (64 -88 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[1 0 0 0] 0.25"
"vaxis" "[0 -1 0 -32] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "77"
"plane" "(48 -88 0) (48 -104 0) (64 -104 0)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[-1 0 0 0] 0.25"
"vaxis" "[0 -1 0 -32] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "76"
"plane" "(48 -104 0) (48 -88 0) (48 -88 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[0 -1 0 -32] 0.25"
"vaxis" "[0 0 -1 0] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "75"
"plane" "(64 -88 0) (64 -104 0) (64 -104 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[0 1 0 32] 0.25"
"vaxis" "[0 0 -1 0] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "74"
"plane" "(48 -88 0) (64 -88 0) (64 -88 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[-1 0 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "73"
"plane" "(64 -104 0) (48 -104 0) (48 -104 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[1 0 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
}
}
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 2500]"
}
}
entity
{
"id" "130"
"classname" "func_button"
"disablereceiveshadows" "0"
"EFlags" "0"
"lip" "0"
"locked_sentence" "0"
"locked_sound" "0"
"movedir" "0 0 0"
"origin" "56 -120 24"
"renderamt" "255"
"rendercolor" "255 255 255"
"renderfx" "0"
"rendermode" "0"
"sounds" "0"
"spawnflags" "1025"
"speed" "5"
"unlocked_sentence" "0"
"unlocked_sound" "0"
"viewhideflags" "0"
"wait" "0.1"
connections
{
"OnPressed" "custom_game_text,CallScriptFunctionClient,DisplayMessage3,0,-1"
}
solid
{
"id" "131"
side
{
"id" "90"
"plane" "(48 -128 48) (48 -112 48) (64 -112 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[1 0 0 0] 0.25"
"vaxis" "[0 -1 0 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "89"
"plane" "(48 -112 0) (48 -128 0) (64 -128 0)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[-1 0 0 0] 0.25"
"vaxis" "[0 -1 0 0] 0.25"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "88"
"plane" "(48 -128 0) (48 -112 0) (48 -112 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[0 -1 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "87"
"plane" "(64 -112 0) (64 -128 0) (64 -128 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[0 1 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "86"
"plane" "(48 -112 0) (64 -112 0) (64 -112 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[-1 0 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
side
{
"id" "85"
"plane" "(64 -128 0) (48 -128 0) (48 -128 48)"
"material" "DEV/DEV_MEASUREGENERIC01"
"uaxis" "[1 0 0 0] 0.25"
"vaxis" "[0 0 -1 0] 0.375"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
}
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
}
}
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 2500]"
}
}
entity
{
"id" "138"
"classname" "logic_script_client"
"ClientThink" "0"
"RunOnServer" "0"
"targetname" "custom_game_text"
"vscripts" "hudmessage.nut"
"origin" "96 -17.7205 8"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 0]"
}
}
cameras
{
"activecamera" "-1"
}
cordon
{
"mins" "(-1024 -1024 -1024)"
"maxs" "(1024 1024 1024)"
"active" "0"
}
print("hudmessage.nut\n");
if ( CLIENT_DLL )
{
function DisplayMessage1()
{
ShowMessage( {
text = "Aliquam imperdiet, sem ut placerat accumsan."
fadein = 0.25,
holdtime = 2.0,
fadeout = 1.0,
x = 0.25,
y = 0.65,
r = 50,
g = 50,
b = 50
} );
}
function DisplayMessage2()
{
ShowMessage( {
text = "Pellentesque vitae mi sit amet justo ornare efficitur. Duis ac leo at dui cursus varius.",
fadein = 0.25,
holdtime = 1.0,
fadeout = 5.0,
x = 0.05,
y = 0.65,
r = 200,
g = 200,
b = 200
} );
}
function DisplayMessage3()
{
ShowMessage( {
text = "Fusce ullamcorper scelerisque risus, a rutrum velit posuere dictum. Vestibulum at congue nisl, vitae convallis arcu. Mauris mattis iaculis nibh, sed fermentum neque suscipit nec",
fadein = 2.0,
holdtime = 1.0,
fadeout = 2.0,
x = 0.25,
y = 0.25,
r = 255,
g = 200,
b = 255
} );
}
//
// vgui and fade logic below
//
surface.CreateFont( "CenterPrintTextDropshadow"
{
"name" : IsOSX() ? "Helvetica" : "Trebuchet MS"
"tall" : 18
"weight" : 900
"antialias" : true
"outline" : false
"dropshadow" : true
"proportional" : true
} );
m_panel <- null;
m_label <- null;
m_flFadeInStartTime <- 0.0;
m_flFadeInDuration <- 0.0;
m_flFadeOutDuration <- 0.0;
m_flHoldDuration <- 0.0;
function ShowMessage( params )
{
if ( m_panel && m_panel.IsValid() )
m_panel.Destroy();
local root = ( "GetHudViewport" in vgui ) ? vgui.GetHudViewport() : vgui.GetClientDLLRootPanel()
m_panel = vgui.CreatePanel( "Panel", root, "hudmessage" );
m_panel.SetZPos( 10 );
m_panel.SetPaintEnabled( true );
m_panel.SetPaintBackgroundEnabled( false );
m_label = vgui.CreatePanel( "Label", m_panel, "label" );
m_label.SetVisible( true );
m_label.SetPaintEnabled( true );
m_label.SetPaintBackgroundEnabled( false );
m_label.SetContentAlignment( Alignment.northwest );
m_panel.SetCallback( "PerformLayout", function()
{
m_panel.SetPos( 0, 0 );
m_panel.SetSize( ScreenWidth(), ScreenHeight() );
local font = surface.GetFont( "CenterPrintTextDropshadow", true );
m_label.SetFont( font );
m_label.SetText( params.text );
m_label.SetWrap( true );
local ix, iy;
if ( params.x == -1 )
ix = ScreenWidth() / 2;
else
ix = ScreenWidth() * params.x;
if ( params.y == -1 )
iy = ScreenHeight() / 2;
else
iy = ScreenHeight() * params.y;
m_label.SetPos( ix, iy );
m_label.SetSize( ScreenWidth() - ix - YRES(4), ScreenHeight() - iy - YRES(4) );
m_label.SetFgColor( params.r, params.g, params.b, 255 );
m_label.SetAlpha( 0 );
}.bindenv(this) );
m_flFadeInDuration = params.fadein;
m_flFadeOutDuration = params.fadeout;
m_flHoldDuration = params.holdtime;
m_flFadeInStartTime = Time() + 0.1;
Entities.First().SetContextThink( "hudmessage_fadethink", FadeThink.bindenv(this), 0.1 );
}
function FadeThink(_)
{
local dt = Time() - m_flFadeInStartTime;
if ( dt < m_flFadeInDuration )
{
local t = dt / m_flFadeInDuration;
m_label.SetAlpha( t * 255.0 );
}
else if ( dt < m_flHoldDuration + m_flFadeInDuration )
{
if ( m_label.GetAlpha() != 255 )
{
m_label.SetAlpha( 255 );
}
}
else
{
local t = ( dt - m_flHoldDuration - m_flFadeInDuration ) / m_flFadeOutDuration;
local a = (1.0 - t) * 255.0;
if ( a < 0.0 )
{
m_panel.Destroy();
m_panel = null;
return -1;
}
m_label.SetAlpha( a );
}
return 0.0;
}
// mapbase 7.1 HACK, ignore
if ( !( "GetHudViewport" in vgui ) )
vgui.CreatePanel( "Panel", vgui.GetRootPanel(), "" ).Destroy();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment