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)
 
(60 intermediate revisions by 25 users not shown)
Line 1: Line 1:
[http://chinese-tableware.pappas.in/ chinese tableware] [http://eleaseshevlin.ifrance.com/articles/what-is-there-to.html what is there to do in toronto] [http://alysiamcveigh.ifrance.com/pages/long-island-paintball.html long island paintball arena] [http://delorasschupp.ifrance.com/comments/world-nude-contest.html world nude contest] [http://eleonorehartlin.ifrance.com/blog/99-luftballons.html 99 luftballons] [http://delorasschupp.ifrance.com/comments/uva-temple.html uva temple] [http://francinewinton.ifrance.com/compare-life.html compare life insurance rates] [http://olivehamburg.ifrance.com/muck-boot-fieldmaster.html muck boot fieldmaster] [http://eleonorehartlin.ifrance.com/blog/annabeth-gish.html annabeth gish] [http://venicesaladino.ifrance.com/resources/log-cabin-homes.html cabin home log sale] [http://herlindaruyle.ifrance.com/data/partition-magic.html partition magic] [http://gopeds.kamahi.in/ gopeds] [http://debt-reduction-programs.kamahi.in/ debt reduction programs] [http://francinewinton.ifrance.com/nextel-i730-cell.html nextel i730 cell phone] [http://eleonorehartlin.ifrance.com/blog/rare.html rare] [http://pertitions.diglot.in/ pertitions] [http://chord.kamahi.in/ chord] [http://francinewinton.ifrance.com/jade-earrings.html jade earrings] [http://francinewinton.ifrance.com/stereographic.html stereographic projections] [http://olivehamburg.ifrance.com/new-homes-of.html home in las nevada new vegas] [http://sports-income.waunakee.in/ sports income] [http://perry-ellis-long.waunakee.in/ perry ellis long rain coats] [http://imus-in-the-morning.explisit.in/ imus in the morning] [http://snowmobile-idaho.pappas.in/ snowmobile idaho] [http://cancun-mexico.pappas.in/ cancun mexico tourism] [http://mls-western-north.waunakee.in/ mls western north carolina] [http://gold-digger-kanye.diglot.in/ gold digger kanye west] [http://the-georgia.kamahi.in/ the georgia satellites] [http://delorasschupp.ifrance.com/comments/cool-edit-20.html cool edit 2.0] [http://smashmouth.pappas.in/ smashmouth] [http://olivehamburg.ifrance.com/hiphopgamecom.html hiphopgame.com] [http://tankless-hot.explisit.in/ tankless hot water tank] [http://eleaseshevlin.ifrance.com/articles/cammel-toe.html cammel toe] [http://eleonorehartlin.ifrance.com/blog/kaye.html katie kaye] [http://school-logo-ideas.explisit.in/ school logo ideas] [http://amd-pci-express.waunakee.in/ amd pci express mobo] [http://eleaseshevlin.ifrance.com/articles/silenced-rifle.html silenced rifle] [http://eleaseshevlin.ifrance.com/articles/national-chaplain.html national chaplain center] [http://venicesaladino.ifrance.com/resources/see-through-blouse.html see through blouse braless] [http://vagina-stretch.kamahi.in/ vagina stretch] [http://air-force-1.pappas.in/ air force 1] [http://cristalengelke.ifrance.com/naked-indian.html naked indian babes] [http://ford-vehicles.diglot.in/ ford vehicles] [http://glenniegrace.ifrance.com/topic/ryan-seacrest.html height ryan seacrest] [http://eleonorehartlin.ifrance.com/blog/vacation-maine.html vacation maine] [http://cristalengelke.ifrance.com/wifi-access.html wifi access points london] [http://cristalengelke.ifrance.com/water-pump.html heat heater pump water] [http://speedstream-2604.kamahi.in/ speedstream 2604] [http://thigh-high-socks.explisit.in/ thigh high socks women] [http://olivehamburg.ifrance.com/new-mexico-major.html city in major mexico new] [http://delorasschupp.ifrance.com/comments/ncpi.html ncpi] [http://foreplay-spankings.explisit.in/ foreplay spankings] [http://olivehamburg.ifrance.com/nrep-conference.html nrep conference] [http://delorasschupp.ifrance.com/comments/vortex.html vortex] [http://cristalengelke.ifrance.com/wedding-coordination.html wedding coordination colorado] [http://angel-anime.explisit.in/ angel anime] [http://delorasschupp.ifrance.com/comments/resdung-ubat.html resdung ubat] [http://groped.kamahi.in/ groped] [http://venicesaladino.ifrance.com/resources/holograf-mp3.html download holograf mp3] [http://us-savings-bonds.pappas.in/ u.s. savings bonds] [http://francinewinton.ifrance.com/free-online-video.html free gay porn video online] [http://delorasschupp.ifrance.com/comments/poor-circulation.html poor circulation in fingers] [http://alysiamcveigh.ifrance.com/pages/older-naked-grannies.html older naked grannies] [http://glenniegrace.ifrance.com/topic/mtd-management.html mtd management] [http://eleonorehartlin.ifrance.com/blog/gondola.html gondola pizza] [http://glenniegrace.ifrance.com/topic/rabbit-foot-key.html rabbit foot key chains] [http://napoleon-dynamite.kamahi.in/ napoleon dynamite] [http://silkscreen-lanyards.explisit.in/ silkscreen lanyards] [http://childmodel.explisit.in/ childmodel] [http://delorasschupp.ifrance.com/comments/ekstre.html ekstre] [http://herlindaruyle.ifrance.com/data/window-open-asp.html window open asp] [http://540ez-form-instructions.pappas.in/ 540ez form instructions] [http://alysiamcveigh.ifrance.com/pages/tone-bank.html tone bank] [http://salem-witch.explisit.in/ salem witch trials movie] [http://eleaseshevlin.ifrance.com/articles/chrono-crusade.html chrono crusade character] [http://miss-bikini.diglot.in/ miss bikini] [http://eleonorehartlin.ifrance.com/blog/13-clark-feb.html 13 clark feb howard] [http://the-wrong-side-of.explisit.in/ the wrong side of town] [http://eleaseshevlin.ifrance.com/articles/slut-video-samples.html slut video samples] [http://olivehamburg.ifrance.com/sauk-rapids-mn.html sauk rapids mn] [http://eleonorehartlin.ifrance.com/blog/i-shouldnt-be.html alive i shouldnt] [http://venicesaladino.ifrance.com/resources/foreign-auto-parts.html foreign auto part pittsburgh] [http://student-login-page.pappas.in/ student login page for university of phoenix] [http://cristalengelke.ifrance.com/encyclopedia.html encyclopedia of genetics] [http://francinewinton.ifrance.com/element-skateboard.html element skateboard] [http://eleonorehartlin.ifrance.com/blog/ak-47-parts.html ak-47 parts kits] [http://franchise-companies.waunakee.in/ franchise companies] [http://venicesaladino.ifrance.com/resources/tunisia-soccer.html tunisia soccer jersey] [http://worlds-largest.waunakee.in/ worlds largest] [http://cristalengelke.ifrance.com/india-arie-ready.html listen india arie ready for love] [http://lucent-partner.pappas.in/ lucent partner 18d phone] [http://alysiamcveigh.ifrance.com/pages/crescent-moon.html crescent moon] [http://cristalengelke.ifrance.com/star-war-funny.html star war funny junk] [http://gay-skaters.waunakee.in/ gay skaters] [http://lemings-downloads.pappas.in/ lemings downloads] [http://francinewinton.ifrance.com/girdled-old-ladies.html girdled old ladies] [http://herlindaruyle.ifrance.com/data/star-wars-7.html 7 episode post star war] [http://venicesaladino.ifrance.com/resources/miriam-d-abo.html miriam d abo] [http://eleonorehartlin.ifrance.com/blog/commercial-vacuums.html commercial vacuums] [http://cristalengelke.ifrance.com/wmv-to-vcd-convert.html wmv to vcd convert]
{{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"[]