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

Weapon cubemap: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Classifying as model entity)
 
(68 intermediate revisions by 29 users not shown)
Line 1: Line 1:
[http://hotelvesuviolourdes.skains.info/ hotel vesuvio lourdes] [http://akonbananzamp3.enlard.info/ akon bananza mp3] [http://wwwpecoreit.enlard.info/ www pecore it] [http://harddiskesterno.alient.info/ hard disk esterno usb portatile] [http://applicatoreetichetta.etotest.info/ applicatore etichetta] [http://alient.info/index6_1000.html homepage] [http://lafossadeidannati.wedged.info/ la fossa dei dannati] [http://bombayviking.alient.info/ bombay viking] [http://storiellalumaca.enlard.info/ storiella lumaca tempo] [http://cercacasevendite.wedged.info/ cerca case vendite privati a firenze] [http://strageossezia.skains.info/ strage ossezia] [http://etotest.info/index6_500.html link] [http://simitrio.behav.info/ simitrio] [http://nuotare.enlard.info/ nuotare] [http://alient.info/index3_1000.html map] [http://skains.info/index5_500.html page] [http://indomabile.skains.info/ indomabile] [http://lultimoperdono.wedged.info/ lultimo perdono] [http://veronashopping.skains.info/ verona shopping] [http://newbeetle20.etotest.info/ new beetle 20] [http://kanyewest.wedged.info/ kanye west] [http://wwwmotard.behav.info/ www motard] [http://scandalorebecca.skains.info/ scandalo rebecca] [http://backstagecalendario.enlard.info/ backstage calendario fontana lessa] [http://a3tecra.behav.info/ a3 tecra] [http://scandurra.behav.info/ scandurra] [http://ricetteperlestate.etotest.info/ ricette per l estate] [http://dr2000.enlard.info/ dr 2000] [http://tastierelogitech.enlard.info/ tastiere logitech lx 500] [http://sitoesauritotv.alient.info/ sitoesaurito tv] [http://raccontisadomaso.wedged.info/ racconti sadomaso bdsm] [http://cybershotdsch1.skains.info/ cyber shot dsc h1] [http://tchuca.skains.info/ tchuca] [http://profumolemale.demogen.info/ profumo le male] [http://lslandmagazine.enlard.info/ ls land magazine] [http://udpstreamplayer.behav.info/ udp stream player 0 2 beta] [http://behav.info/index4_500.html homepage] [http://bmwz3.enlard.info/ bmwz3] [http://enlard.info/index2_500.html page] [http://lungoilfiume.enlard.info/ lungo il fiume] [http://homesala.wedged.info/ home sala] [http://obladioblada.enlard.info/ ob la di ob la da] [http://luomochesapeva.behav.info/ luomo che sapeva troppo poco] [http://freemoviesporno.behav.info/ free movies porno] [http://prigionierovolontario.skains.info/ prigioniero volontario] [http://forumescortalexia.skains.info/ forum escort alexia russa] [http://tastieranokia.demogen.info/ tastiera nokia 6630] [http://furughtback.behav.info/ fu rught back] [http://moonr.alient.info/ moonr] [http://alient.info/index4_1000.html homepage] [http://pallavolofemminile.wedged.info/ pallavolo femminile serie a] [http://lanemojeremix.behav.info/ lane moje remix] [http://lispme.demogen.info/ lispme] [http://annunciolavoro.enlard.info/ annuncio lavoro chiesa valmalenco] [http://rafetelroman.wedged.info/ rafet el roman yalanci sahidim] [http://videohardgratis.etotest.info/ video hard gratis valentina demi] [http://richiestelavoro.demogen.info/ richieste lavoro] [http://psicologiacolori.enlard.info/ psicologia colori] [http://irigoridimadrid.demogen.info/ i rigori di madrid] [http://magic-magia.alient.info/ magic - magia] [http://wwwmewmewamiche.wedged.info/ www mewmew amiche vincenti it] [http://vectraberlina.skains.info/ vectra berlina] [http://grandefratello.enlard.info/ grande fratello 4 oops vid caps] [http://filminiincesto.alient.info/ filmini incesto gratis] [http://magnaromagnait.behav.info/ magnaromagna i t] [http://inmobiliare.enlard.info/ inmobiliare] [http://bikkembergssneakers.demogen.info/ bikkembergs sneakers] [http://figlioemadre.skains.info/ figlio e madre] [http://farmlessonscomixxx.skains.info/ farm lessons comixxx] [http://acdsee70crack.demogen.info/ acdsee 7 0 crack] [http://fotodeatrizesnuas.alient.info/ foto de atrizes nuas] [http://etotest.info/index2_250.html site] [http://nuoveimmaginie.enlard.info/ nuove immagini e nuovo trailer per tekken 5] [http://vasterapia.skains.info/ vas terapia] [http://minau.skains.info/ minau] [http://domenicamattina.demogen.info/ domenica mattina] [http://muvon200lettore.skains.info/ muvo n200 lettore mp3 usb] [http://frigoside.enlard.info/ frigo side] [http://wp-dc800.etotest.info/ wp-dc800] [http://totaleclipseof.behav.info/ total eclipse of the hearth] [http://canonixsus40.behav.info/ canon ixsus 40] [http://piccoliproprietari.behav.info/ piccoli proprietari contratto affitto] [http://cegranemk.behav.info/ cegrane mk] [http://damasco25.skains.info/ damasco 25] [http://wielka.demogen.info/ wielka] [http://traduzionidallitaliano.behav.info/ t raduzioni dall italiano all inglese] [http://ipromisemyself.behav.info/ i promise myself] [http://behav.info/index3_250.html home] [http://borsametalli.behav.info/ borsa metalli] [http://pieropeluio.etotest.info/ piero pelu io ci saro] [http://thomsonmp3gb.enlard.info/ thomson mp3 gb] [http://magic3philips.wedged.info/ magic 3 philips] [http://gutaliviu.enlard.info/ guta liviu] [http://cantidadesde.behav.info/ cantidades de los elementos quimicos] [http://pornoincontro.wedged.info/ porno incontro molise] [http://personaggiowalt.demogen.info/ personaggio walt disney] [http://patriziarossetti.enlard.info/ patrizia rossetti nuda] [http://zaireprovincia.behav.info/ zaire provincia] [http://fujis7000.demogen.info/ fuji s7000] [http://enlard.info/index4_500.html home]  
{{LanguageBar}}
{{wrongtitle|title=weapon_cubemap}}
{{Ent not in fgd}}
[[File:weapon_cubemap_Demonstration.png|thumb|300px|right|weapon_cubemap in {{hl2|4}}.]]
{{CD|CWeaponCubemap|base=CBaseCombatWeapon|file1=1}}
{{This is a|model entity|name=weapon_cubemap|engine=Source|game=Half-Life 2 series|game1=Portal series|game2=Portal 2: Community Edition}}  


==Entity description==
This entity gives the player a set of spheres {{file|preset=2|models/shadertest/envballs|mdl}}, each with different reflective surfaces. It is used for checking [[cubemaps]].
[[Image:Surf_prejefuck0000.jpg|thumb|300px|right|weapon_cubemap in CSS]]
This entity gives the player a set of spheres (<code>models/shadertest/envballs.mdl</code>), each with different reflective surfaces. It is used for checking [[cubemaps]].


The commands to recieve the weapon_cubemap (typed into the console) is either <code>[[impulse]] 81</code> or <code>give weapon_cubemap</code>.
The commands to get it (typed into the console) are either {{cmd|impulse|81}} or {{cmd|give|weapon_cubemap}}.
These commands are considered cheats, meaning that [[Sv_cheats|sv_cheats]] must be set to 1, or developer mode must be enabled, for them to work.
These commands are considered cheats, meaning that {{cmd|sv_cheats}} must be enabled for them to work.<br>
You can switch to this weapon (after having received it) by typing <code>use weapon_cubemap</code>.
You can switch to this weapon (after having received it) by typing {{code|preset=1|use weapon_cubemap}}.


{{tip|To equip and draw the weapon for quick work, developers can bind this command to a specific key. For instance, typing <code>bind "X" "impulse 81"; "use weapon_cubemap"</code> will bind it to the X key. (You may need to press it twice the first time you use it in a map.)}}
{{tip|To equip and draw the weapon for quick work, developers can bind this command to a specific key. For instance, typing {{cmd|bind|"X" "impulse 81"; "use weapon_cubemap"}} will bind it to the X key. (You may need to press it twice the first time you use it in a map.)}}
{{tip|Changing weapon_cubemap's viewmodel to an invisible model (such as blackout.mdl) can be an easy method of hiding the players HUD and weapon at the same time without needing {{ent|player_speedmod}}.}}
{{note|{{p2}} does have it in a working condition but needs the model from another game}}


== Workarounds ==
If your game does not have <code>weapon_cubemap</code>, rifle scopes could be used, such as the [[weapon hunting rifle spawn|hunting rifle]] in {{l4d2|4}}, the [[weapon awp|AWP]] in {{csgo|4|nt=1}} or the [[weapon_crossbow|crossbow]] in {{bms|4}}, as alternatives.
Community mods have been made to implement it into games that do not support it natively:
* {{tf2|2}}: Create a [[VScript]] file named {{file|weapon_cubemap|nut}} inside {{path|tf/scripts/vscripts/}}, paste in the following code and then type <code>script_execute weapon_cubemap</code> and switch to melee.
::<source lang=js>
local player = GetListenServerHost()
local cubemap = "models/shadertest/envballs.mdl"
PrecacheModel(cubemap)
for (local i = 0; i < 8; i++)
{
    local weapon = NetProps.GetPropEntityArray(player, "m_hMyWeapons", i)
    if (weapon && weapon.GetSlot() == 2)
weapon.SetCustomViewModel(cubemap)
}
</source>
* {{csgo}} [https://www.youtube.com/watch?v=TsGp9t9kYk4 Counter-Strike: Global Offensive]: Tutorial by TopHattWaffle and Zool Smith
* {{l4d2}} [https://steamcommunity.com/sharedfiles/filedetails/?id=1832861982 Left 4 Dead 2]: Tutorial by MrFunreal
* {{bms}} [https://steamcommunity.com/sharedfiles/filedetails/?id=3342667300 Weapon_Cubemap (Dev Tool)]: A simple replacement for the [[weapon_assassin_glock|assassin glock]] by Jofoyo
== FGD Code ==
<pre>
@PointClass base(Weapon,Targetname, Parentname) studio("models/shadertest/envballs.mdl") = weapon_cubemap : "Cubemap preview spheres"[]
</pre>
[[Category:Cubemaps]]
[[Category:Level Design]]
[[Category:Level Design]]
[[Category:Weapons]]

Latest revision as of 04:36, 19 May 2025

English (en)한국어 (ko)Translate (Translate)
Icon-NotInFGD.png
This entity is not in the FGD by default.
See below for instructions on making it available.
weapon_cubemap in Half-Life 2 Half-Life 2.
C++ Class hierarchy
CWeaponCubemap
CBaseCombatWeapon
CBaseAnimating
CBaseEntity
C++ weapon_cubemap.cpp

weapon_cubemap is a model entity available in Half-Life 2 series Half-Life 2 series, Portal series Portal series, and Portal 2: Community Edition Portal 2: Community Edition.

This entity gives the player a set of spheres 🖿models/shadertest/envballs.mdl, each with different reflective surfaces. It is used for checking cubemaps.

The commands to get it (typed into the console) are either impulse 81 or give weapon_cubemap. These commands are considered cheats, meaning that sv_cheats must be enabled for them to work.
You can switch to this weapon (after having received it) by typing use weapon_cubemap.

Tip.pngTip:To equip and draw the weapon for quick work, developers can bind this command to a specific key. For instance, typing bind "X" "impulse 81"; "use weapon_cubemap" will bind it to the X key. (You may need to press it twice the first time you use it in a map.)
Tip.pngTip:Changing weapon_cubemap's viewmodel to an invisible model (such as blackout.mdl) can be an easy method of hiding the players HUD and weapon at the same time without needing player_speedmod.
Note.pngNote:Portal 2 does have it in a working condition but needs the model from another game

Workarounds

If your game does not have weapon_cubemap, rifle scopes could be used, such as the hunting rifle in Left 4 Dead 2 Left 4 Dead 2, the AWP in Counter-Strike: Global Offensive CS:GO or the crossbow in Black Mesa Black Mesa, as alternatives.

Community mods have been made to implement it into games that do not support it natively:

  • Team Fortress 2 Team Fortress 2: Create a VScript file named 🖿weapon_cubemap.nut inside 🖿tf/scripts/vscripts/, paste in the following code and then type script_execute weapon_cubemap and switch to melee.
local player = GetListenServerHost()
local cubemap = "models/shadertest/envballs.mdl"
PrecacheModel(cubemap)
for (local i = 0; i < 8; i++)
{
    local weapon = NetProps.GetPropEntityArray(player, "m_hMyWeapons", i)
    if (weapon && weapon.GetSlot() == 2)
		weapon.SetCustomViewModel(cubemap)
}

FGD Code

@PointClass base(Weapon,Targetname, Parentname) studio("models/shadertest/envballs.mdl") = weapon_cubemap : "Cubemap preview spheres"[]