This article's documentation is for anything that uses the Source engine. Click here for more information.

Point spotlight: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(84 intermediate revisions by 34 users not shown)
Line 1: Line 1:
[http://tdtuamo.hostinggratisbrasil.com/resources/billy-martin.html billy martin] [http://tibuogoz.hostinggratisbrasil.com/html/the-naked-news.html the naked news] [http://aubreygildersle.freeweb7.com/les-deux-gros.html les deux gros] [http://doreengilleland.totalh.com/pages/the-jam.html the jam] [http://tdtuamo.hostinggratisbrasil.com/resources/berries.html berries] [http://pianoislove.ourprofile.net/directory/office-moving.html office moving] [http://paulareimann.infernohost.net/civil-war-flags.htm civil war flags] [http://tibuogoz.hostinggratisbrasil.com/html/online-project-management.html online project management] [http://soonweddington.infernohost.net/content/motorcycle-clubs.htm motorcycle clubs] [http://ramonapasko.friko.pl/wiki/microsoft-malicious.html microsoft malicious software removal tool] [http://yukohiatt.infernohost.net/natural-health.html natural health] [http://goraina.interfree.it/race-car-classifieds.html race car classifieds] [http://zzizlita.hostinggratisbrasil.com/power-loss-in.html power loss in underground cables] [http://missmoxr.ayudauni.net/garden-supply.html garden supply online] [http://mayrakoontz.ourprofile.net/description/jennifer-copeland.html jennifer copeland] [http://laniwgi.fhpanel.com/eva-nude.htm eva nude] [http://lieselottehasse.infernohost.net/pregnant-woman.html pregnant woman photos] [http://argentinaperale.infernohost.net/tiffany-jewellry.html tiffany jewellry store] [http://bernadinetrotta.indo.tc/ceramic-bisque.html ceramic bisque] [http://menkeydarren.ayudauni.net/girlfriend-revenge.html girlfriend revenge] [http://jeffieseab.fhpanel.com/styles/nioxin.html nioxin] [http://bernadinetrotta.indo.tc/inside-your-heaven.html inside your heaven] [http://jacqualineblay.friko.pl/text/pearl-jam.html pearl jam] [http://ileenbabb.totalh.com/data/xxl-ass.html xxl ass] [http://kwowukxa.hostinggratisbrasil.com/garden-obelisk-trellis.html garden obelisk trellis] [http://moniquemoye.freeweb7.com/data/sexy-jessica-rabbit.htm sexy jessica rabbit] [http://ramonapasko.friko.pl/wiki/windows-task.html windows task manager system tray] [http://goraina.interfree.it/goldie-hawn.html goldie hawn] [http://fowapvu.fhpanel.com/html/list-madonna.htm list madonna song tour] [http://fowapvu.fhpanel.com/html/today.htm today] [http://alejandrinawhip.ourprofile.net/view/brown-booty.html brown booty] [http://paulareimann.infernohost.net/haddaway-what-is.htm haddaway what is love] [http://armandaabbott.totalh.com/comments/music-city-merchandise.html music city merchandise tn] [http://ramonapasko.friko.pl/wiki/apartment-rental.html apartment rental michigan] [http://tibuogoz.hostinggratisbrasil.com/html/pdiddy.html pdiddy] [http://doreengilleland.totalh.com/pages/raffle-drums.html raffle drums] [http://laniwgi.fhpanel.com/alyssa-clip.htm alyssa clip milano nude] [http://womamalimi.hostinggratisbrasil.com/sound-clips.html sound clips] [http://kwowukxa.hostinggratisbrasil.com/hot-asian-models.html hot asian models] [http://cordiademby.w8w.pl/resources/maui-condos.html maui condos rent] [http://menkeydarren.ayudauni.net/quilt-shops.html quilt shops] [http://ileenbabb.totalh.com/data/alternative.html alternative citibank loan] [http://tibuogoz.hostinggratisbrasil.com/html/swimming-boys-underwear.html swimming boys underwear] [http://zilivrenglaur.ayudauni.net/golden-west-financial.html golden west financial] [http://themusecalliope.interfree.it/blog/marionette-and-hand.htm marionette and hand puppet stage] [http://alejandrinawhip.ourprofile.net/view/collarmecom.html collarme.com] [http://goraina.interfree.it/bondage-babes.html bondage babes] [http://womamalimi.hostinggratisbrasil.com/together-we-stand.html together we stand] [http://zilivrenglaur.ayudauni.net/sweet-cherry.html sweet cherry juice] [http://temptedlush.interfree.it/html/latina-moms.html latina moms] [http://zzizlita.hostinggratisbrasil.com/cliffside-park-homes.html cliffside park homes] [http://armandaabbott.totalh.com/comments/traditional-marketing.html traditional marketing system] [http://tdtuamo.hostinggratisbrasil.com/resources/gwyneth-paltrow.html gwyneth paltrow] [http://temptedlush.interfree.it/html/orgy-videos.html orgy videos] [http://lowukibiwo.fhpanel.com/ugly-pussy.html ugly pussy] [http://meridemko.indo.tc/view/car-donation.html car donation] [http://jeffieseab.fhpanel.com/styles/mohawk-hairstyles.html mohawk hairstyles] [http://soonweddington.infernohost.net/content/rubber-ducky.htm rubber ducky] [http://lowukibiwo.fhpanel.com/human-sexuality.html human sexuality positions] [http://menkeydarren.ayudauni.net/azas-movies.html azas movies] [http://soonweddington.infernohost.net/content/teen-boy-gay.htm teen boy gay] [http://selinaswigert.friko.pl/pages/ling-xiaoyu.html ling xiaoyu] [http://zherezx.ayudauni.net/articles/gun-cases.html gun cases] [http://aubreygildersle.freeweb7.com/bondage-stories.html bondage stories] [http://tucabello.infernohost.net/description/gangbang-sqaud.html gangbang sqaud] [http://kwowukxa.hostinggratisbrasil.com/flash-sites.html flash sites] [http://dungkinslow.infernohost.net/directory/cspan.html cspan] [http://paulareimann.infernohost.net/cheap-phentermine.htm cheap phentermine online] [http://daniellegowins.totalh.com/text/moby-extreme-ways.html moby extreme ways] [http://themusecalliope.interfree.it/blog/slutsgate.htm slutsgate] [http://alejandrinawhip.ourprofile.net/view/wolf.html wolf] [http://laniwgi.fhpanel.com/latina-thong.htm latina thong] [http://yukohiatt.infernohost.net/basketball-bets.html basketball bets] [http://yukohiatt.infernohost.net/wwamateurs.html wwamateurs] [http://tibuogoz.hostinggratisbrasil.com/html/neighbor-sex.html neighbor sex] [http://moniquemoye.freeweb7.com/data/enterprise-rental.htm enterprise rental car] [http://zilivrenglaur.ayudauni.net/amr-converter-free.html amr converter free mp3] [http://zilivrenglaur.ayudauni.net/fantastic-facial.html fantastic facial] [http://quiris.interfree.it/milk-my-cock.html milk my cock] [http://daniellegowins.totalh.com/text/cats.html cats] [http://womamalimi.hostinggratisbrasil.com/backseat-fucking.html backseat fucking] [http://argentinaperale.infernohost.net/nude-surfer.html nude surfer] [http://temptedlush.interfree.it/html/rwanda-genocide.html rwanda genocide] [http://tibuogoz.hostinggratisbrasil.com/html/cream-pie-pussy.html cream pie pussy] [http://zilivrenglaur.ayudauni.net/bathroom-lights.html bathroom lights] [http://kwowukxa.hostinggratisbrasil.com/nerd-music-videos.html nerd music videos] [http://tucabello.infernohost.net/description/shop-vac.html shop vac] [http://menkeydarren.ayudauni.net/family-nudist.html family nudist photography] [http://jacqualineblay.friko.pl/text/pontiac-torrent.html pontiac torrent] [http://daniellegowins.totalh.com/text/vsat-satellite.html vsat satellite internet] [http://paulareimann.infernohost.net/jerry-seinfeld.htm jerry seinfeld] [http://sujowirlo.fhpanel.com/hip-hop-mp3.html hip hop mp3] [http://jeffieseab.fhpanel.com/styles/melina-nude.html melina nude] [http://georgeswanigan.freeweb7.com/small/latin-bikini-model.html latin bikini model] [http://themusecalliope.interfree.it/blog/carol-smiley.htm carol smiley] [http://moniquemoye.freeweb7.com/data/girl-sex-with.htm girl sex with animal] [http://tibuogoz.hostinggratisbrasil.com/html/uk-classic-car.html uk classic car sales] [http://romainehibbler.totalh.com/text/internet-pornography.html internet pornography] [http://lieselottehasse.infernohost.net/blowing-a-horse.html blowing a horse cock] [http://helanur.interfree.it/blog/online-cialis.htm online cialis] [http://soonweddington.infernohost.net/content/green-guy-adult.htm green guy adult links] [http://moniquemoye.freeweb7.com/data/outdoor-education.htm outdoor education games] [http://sujowirlo.fhpanel.com/3d-fire-screensaver.html 3d fire screensaver] [http://selinaswigert.friko.pl/pages/museum-of-mankind.html museum of mankind london] [http://chelsxd.ourprofile.net/arizona-republic.html arizona republic] [http://ileenbabb.totalh.com/data/business-management.html business management consulting] [http://missmoxr.ayudauni.net/downtown.html downtown] [http://erabrust.totalh.com/small/free-bukkake-movies.html free bukkake movies] [http://corinaperras.totalh.com/nudist-gallery.htm nudist gallery] [http://themusecalliope.interfree.it/blog/mizuno.htm mizuno] [http://missmoxr.ayudauni.net/playboy-centerfolds.html playboy centerfolds] [http://zilivrenglaur.ayudauni.net/sint-maarten.html sint maarten airport car rental] [http://pianoislove.ourprofile.net/directory/hawkgirl.html hawkgirl] [http://goraina.interfree.it/toon-fucking.html toon fucking] [http://zilivrenglaur.ayudauni.net/george-mikan.html george mikan] [http://tdtuamo.hostinggratisbrasil.com/resources/jenny-mccarthy.html jenny mccarthy nude] [http://tucabello.infernohost.net/description/jane-darling.html jane darling] [http://georgeswanigan.freeweb7.com/small/drawings-gay-men.html drawings gay men] [http://fowapvu.fhpanel.com/html/one-a-day-vitamin.htm one a day vitamin] [http://helanur.interfree.it/blog/remote-desktop.htm remote desktop] [http://zilivrenglaur.ayudauni.net/stds.html stds] [http://romainehibbler.totalh.com/text/kiko-wu.html kiko wu] [http://quiris.interfree.it/lyme-disease.html lyme disease] [http://ileenbabb.totalh.com/data/rogue-talents-guide.html rogue talents guide] [http://goraina.interfree.it/real-estate-virginia.html real estate virginia] [http://tucabello.infernohost.net/description/best-home-based.html best home based business] [http://cacophonysaint.w8w.pl/html/harry-and-david.htm harry and david] [http://missmoxr.ayudauni.net/college-speedo.html college speedo hunks] [http://erabrust.totalh.com/small/pornstore.html pornstore] [http://laniwgi.fhpanel.com/throat-gaggers.htm throat gaggers] [http://doreengilleland.totalh.com/pages/mike-dragna.html mike dragna] [http://zzizlita.hostinggratisbrasil.com/collegegirls.html collegegirls] [http://goraina.interfree.it/free-printable.html free printable award certificates] [http://goraina.interfree.it/get-well.html get well] [http://selinaswigert.friko.pl/pages/poetry-contests.html poetry contests] [http://cacophonysaint.w8w.pl/html/uk.htm uk] [http://kiwizzo.indo.tc/jason-isaacs.htm jason isaacs] [http://zilivrenglaur.ayudauni.net/empire-fall-roman.html empire fall roman western] [http://zherezx.ayudauni.net/articles/pet-supplies.html pet supplies] [http://soonweddington.infernohost.net/content/epson-printer.htm epson printer ink] [http://menkeydarren.ayudauni.net/hooded-sweatshirts.html hooded sweatshirts] [http://georgeswanigan.freeweb7.com/small/penis-jerking.html penis jerking off] [http://pianoislove.ourprofile.net/directory/hawaiian-flower.html hawaiian flower] [http://menkeydarren.ayudauni.net/wanton-slut.html wanton slut] [http://soonweddington.infernohost.net/content/norton.htm norton] [http://zzizlita.hostinggratisbrasil.com/masturbating-techniques.html masturbating techniques] [http://argentinaperale.infernohost.net/roush.html roush] [http://aubreygildersle.freeweb7.com/linda-park-nude.html linda park nude] [http://missmoxr.ayudauni.net/tangas-culos.html tangas culos] [http://yukohiatt.infernohost.net/partridge-family.html partridge family]  
{{LanguageBar}}
{{wrongtitle|title=point_spotlight}}
{{CD|CPointSpotlight|file1=1}}
== Entity description ==
[[File:PointSpotlight.jpg|thumb|right|192px|A point_spotlight.]]
An entity to draw a spotlight primarily consisting of two glow sprites: A beam when the player views it side on, and a halo when it's facing towards the player. Unless the 'No Dynamic Light' spawn flag is checked, it will also create a dynamic light wherever the end of the spotlight rests.
{{this is a|point entity|name=point_spotlight}} Creates two glow sprite effects: a ''beam'' effect for viewers outside the light cone and a ''halo'' effect for viewers inside the cone. Also creates dynamic light at the end of the beam if desired flags are set which is achieved using {{ent|spotlight_end}}.
{{note|Without the dynamic light this entity will just provide a sprite effect, and will not serve as an actual light source.}}


== Keyvalues ==
The {{ent|spotlight_end}} functionality can be disabled with the 'No Dynamic Light' spawnflag. In that state, the spotlight will not actually illuminate other objects on its own and can be used with an accompanying {{ent|light_spot}} or {{ent|env_projectedtexture}} instead.
* {{kv targetname}}
* {{kv parentname}}
* {{kv renderfields}}
* {{kv angles}}
* {{kv hdrcolorscale}}


* '''spotlightlength'''
{{bug|hidetested=1|In {{portal2|4}} and {{bms|4}} the '''Alpha''' (''renderamt'') property is not functional at all, use '''HDRColorScale''' instead.}}
: <integer> Length of the spotlight beam.
{{warning|This entity generates 3 [[edict]]s (for itself, the beam visual and beam target respectively: {{mono|point_spotlight}}, {{ent|beam}}, {{ent|spotlight_end}}! In {{tf2|4}} and {{gmod|4}}, the <code>point_spotlight</code> itself has been converted to a server-only entity (does not take up an edict), and in {{tf2|4}}, when no targetname and parentname is assigned, the <code>point_spotlight</code> and <code>spotlight_end</code> entity is also killed, thus consuming 1 edict in total for a static spotlight.}}
{{bug|tested={{hl2}},{{bms}}|Killing this entity either by '''Kill''' input or by killing its parent while it's turned on will leave behind the <kbd>beam</kbd> and <kbd>spotlight_end</kbd> entities. Beam won't be visible but the spotlight_end will be.
{{workaround|Fire '''LightOff''' input first, then with small delay '''Kill'''.}}
}}
{{note|{{ent|beam}} collides only with [[prop_static]] and world geometry, this means that beam of [[point_spotlight]] and dynamic light will ignore any dynamic objects (with the exception of [[func_physbox]]), [[NPC]]s, [[physics objects]], e.t.c.}}


* '''spotlightwidth'''
{{expand|title=Third-Party notices {{asd}}{{bms}}|
: <integer> Width of the spotlight beam.
{{note|In {{asd|4}} this entity is not supported and on loading a map all point_spotlight entities will be converted to [[Light deferred]]!}}
{{important|{{bms|4}} are using [[deferred lighting]] for [[spotlight_end|light source from this entity]].}}
}}


* '''rendercolor'''
== Keyvalues ==
: {{color}} The color of the spotlight cone.
{{KV Targetname}}
{{KV|Ignore Solid|intn=IgnoreSolid|bool|If set, this spotlight won't trace for solids, emitting at its full length and ignoring potential obstructions.|since={{src13mp}}|also={{gmod}}{{mapbase}}  ,  {{!fgd}} in {{bms}}}}
{{KV|Spotlight Length|intn=SpotlightLength|integer|Length of the spotlight beam.}}
{{KV|Spotlight Width|intn=SpotlightWidth|integer|Width of the spotlight beam.}}
{{KV|Color (R G B)|intn=rendercolor|color255|Spotlight color.}}
{{KV|HDR color scale.|intn=HDRColorScale|float|Float value to multiply sprite color by when running in HDR mode.}}
{{KV|Halo size scale.|intn=HaloScale|float|Float value to determine the size of the halo.|since={{l4d2}}|also={{mapbase}}}}
{{expand|title={{mapbase|4}} only properties|
{{KV|Halo material|intn=HaloMaterial|string|Material to use for the halo.}}
{{KV|Spotlight beam material|intn=SpotlightMaterial|string|Material to use for the spotlight's beam.}}
}}
{{expand|title=Performance properties|
{{KV DXLevelChoice}}
{{KV SystemLevelChoice}}
}}


== Flags ==
== Flags ==
* 1 : Start On
{{Fl|1|Start On}}
: Sets the point_spotlight to be turned on when it spawns.
{{Fl|2|No Dynamic Light}}
{{bug|hidetested=1|In {{l4d2|4}} alpha of spawned {{ent|spotlight_end}} is set wrongly causing no light to be visible. {{fix|Use following script as point_spotlight's Entity script {{ExpandBox|<syntaxhighlight lang=js>function L4D2PointSpotlightFix() {
    for(local ent; ent = Entities.FindByClassname(ent, "spotlight_end");) {
        if(NetProps.GetPropEntity(ent, "m_hOwnerEntity") == self) {
            local clrrender = NetProps.GetPropInt(self, "m_clrRender");
            NetProps.SetPropInt(ent, "m_clrRender", clrrender);
            return;
        }
    }
}


* 2 : No Dynamic Light
function OnPostSpawn() {
: Prevents a dynamic light from being generated by the point_spotlight. Dynamic lights can be costly for performance, so this flag should be checked to improve framerate.
    if((NetProps.GetPropInt(self, "m_spawnflags") & 3) == 0) {
        L4D2PointSpotlightFix();
    }
    self.ConnectOutput("OnLightOn", "L4D2PointSpotlightFix")
}</syntaxhighlight>}}}}}}


== Inputs ==
== Inputs ==
*{{i targetname}}
{{I|LightOn|Turn the spotlight on.}}
*{{i parentname}}
{{I|LightOff|Turn the spotlight off.}}
*{{i renderfields}}
{{I|LightToggle|Toggles the spotlight on/off|only={{mapbase}}}}
{{I|SetColor|Change the color of the spotlight. Light must be turned off then back on for dynamic light to update.|param=color255|since={{AS}}|also={{GMOD}}}}
:{{note|Functionally identical to the {{mono|Color}} input. A delay of at least 0.01 is required before the spotlight is turned back on, or else it will remain off.}}
{{I|ForceUpdate|Force an update of the spotlight position and orientation.|since={{AS}}|also={{GMOD}}}}


* '''LightOn'''
== Outputs ==
{{O|OnLightOn|ac-is-this=1|Fires when light turns on.}}
{{O|OnLightOff|ac-is-this=1|Fires when light turns off.}}


* '''LightOff'''
== Code related ==
 
By default, point_spotlight uses the material ''sprites/glow_test02.vmt''. You can change this if you are shipping your own binaries by going into ''point_spotlight.cpp'' in the server project, navigating to line 351 and replacing the file path with your own material or a reference to a variable set via a KV similarly as {{mapbase|4}}'s <kbd>SpotlightMaterial</kbd> KV.
== Outputs ==
* {{o targetname}}


== See also ==
== See also ==
* [[light_spot]]
* [[Lighting]]
* [[npc_spotlight]]


[[Category:Entities]]
[[Category:Lighting]]

Latest revision as of 03:43, 20 July 2025

English (en)Русский (ru)Translate (Translate)
C++ Class hierarchy
CPointSpotlight
CPointEntity
CBaseEntity
C++ point_spotlight.cpp
A point_spotlight.

point_spotlight is a point entity available in all Source Source games. Creates two glow sprite effects: a beam effect for viewers outside the light cone and a halo effect for viewers inside the cone. Also creates dynamic light at the end of the beam if desired flags are set which is achieved using spotlight_end.

The spotlight_end functionality can be disabled with the 'No Dynamic Light' spawnflag. In that state, the spotlight will not actually illuminate other objects on its own and can be used with an accompanying light_spot or env_projectedtexture instead.

Icon-Bug.pngBug:In Portal 2 Portal 2 and Black Mesa Black Mesa the Alpha (renderamt) property is not functional at all, use HDRColorScale instead.
Warning.pngWarning:This entity generates 3 edicts (for itself, the beam visual and beam target respectively: point_spotlight, beam, spotlight_end! In Team Fortress 2 Team Fortress 2 and Garry's Mod Garry's Mod, the point_spotlight itself has been converted to a server-only entity (does not take up an edict), and in Team Fortress 2 Team Fortress 2, when no targetname and parentname is assigned, the point_spotlight and spotlight_end entity is also killed, thus consuming 1 edict in total for a static spotlight.
Icon-Bug.pngBug:Killing this entity either by Kill input or by killing its parent while it's turned on will leave behind the beam and spotlight_end entities. Beam won't be visible but the spotlight_end will be.
PlacementTip.pngWorkaround:Fire LightOff input first, then with small delay Kill.
  (tested in: Half-Life 2,Black Mesa)
Note.pngNote:beam collides only with prop_static and world geometry, this means that beam of point_spotlight and dynamic light will ignore any dynamic objects (with the exception of func_physbox), NPCs, physics objects, e.t.c.
Third-Party notices Alien Swarm DeferredBlack Mesa
Note.pngNote:In Alien Swarm Deferred Alien Swarm Deferred this entity is not supported and on loading a map all point_spotlight entities will be converted to Light deferred!

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Ignore Solid (IgnoreSolid) <boolean> (in all games since Source 2013 Multiplayer) (also in Garry's ModMapbase , !FGD in Black Mesa)
If set, this spotlight won't trace for solids, emitting at its full length and ignoring potential obstructions.
Spotlight Length (SpotlightLength) <integer>
Length of the spotlight beam.
Spotlight Width (SpotlightWidth) <integer>
Width of the spotlight beam.
Color (R G B) (rendercolor) <color255>
Spotlight color.
HDR color scale. (HDRColorScale) <float>
Float value to multiply sprite color by when running in HDR mode.
Halo size scale. (HaloScale) <float> (in all games since Left 4 Dead 2) (also in Mapbase)
Float value to determine the size of the halo.
Mapbase Mapbase only properties
Halo material (HaloMaterial) <string>
Material to use for the halo.
Spotlight beam material (SpotlightMaterial) <string>
Material to use for the spotlight's beam.
Performance properties
Minimum / Maximum DX Level (mindxlevel / maxdxlevel) <integer choices> (removed since Left 4 Dead)
The entity will not exist if the engine is running outside the given range of DirectX Versions.
Choices
Warning.pngWarning:If these are used, the object may break when the user switches their DirectX settings.[missing string]
Minimum / Maximum Effect Details Level (mincpulevel / maxcpulevel) <integer choices> (in all games since Left 4 Dead)
Don't render for players with Effect Details levels that exceed the minimum or maximum.
Choices
  • 0: Default ("Low" for mincpulevel, "High" for maxcpulevel)
  • 1: Low
  • 2: Medium
  • 3: High
Minimum / Maximum Shader Details Level (mingpulevel / maxgpulevel) <integer choices> (in all games since Left 4 Dead)
Don't render for players with Shader Details levels that exceed the minimum or maximum.
Choices
  • 0: Default ("Low" for mingpulevel, "Very High" for maxgpulevel)
  • 1: Low
  • 2: Medium
  • 3: High
  • 4: Very High
See also:  cpu_level / gpu_level convars

Flags

Start On : [1]
No Dynamic Light : [2]
Icon-Bug.pngBug:In Left 4 Dead 2 Left 4 Dead 2 alpha of spawned spotlight_end is set wrongly causing no light to be visible.
Note.pngFix:Use following script as point_spotlight's Entity script

function L4D2PointSpotlightFix() {
    for(local ent; ent = Entities.FindByClassname(ent, "spotlight_end");) {
        if(NetProps.GetPropEntity(ent, "m_hOwnerEntity") == self) {
            local clrrender = NetProps.GetPropInt(self, "m_clrRender");
            NetProps.SetPropInt(ent, "m_clrRender", clrrender);
            return;
        }
    }
}

function OnPostSpawn() {
    if((NetProps.GetPropInt(self, "m_spawnflags") & 3) == 0) {
        L4D2PointSpotlightFix();
    }
    self.ConnectOutput("OnLightOn", "L4D2PointSpotlightFix")
}

Inputs

LightOn
Turn the spotlight on.
LightOff
Turn the spotlight off.
LightToggle  (only in Mapbase)
Toggles the spotlight on/off
SetColor <color255RedirectInput/color32> (in all games since Alien Swarm) (also in Garry's Mod)
Change the color of the spotlight. Light must be turned off then back on for dynamic light to update.
Note.pngNote:Functionally identical to the Color input. A delay of at least 0.01 is required before the spotlight is turned back on, or else it will remain off.
ForceUpdate  (in all games since Alien Swarm) (also in Garry's Mod)
Force an update of the spotlight position and orientation.

Outputs

OnLightOn
!activator = !caller = this entity
Fires when light turns on.
OnLightOff
!activator = !caller = this entity
Fires when light turns off.

Code related

By default, point_spotlight uses the material sprites/glow_test02.vmt. You can change this if you are shipping your own binaries by going into point_spotlight.cpp in the server project, navigating to line 351 and replacing the file path with your own material or a reference to a variable set via a KV similarly as Mapbase Mapbase's SpotlightMaterial KV.

See also