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)
 
(64 intermediate revisions by 28 users not shown)
Line 1: Line 1:
[http://troniny.ovh.org/gallery/layout/nrhlsw.html missouri construction jobs] [http://www.salona-yachts.eu/misc/dfkdcv.html multifunction peripherals] [http://activeimage.c3.hu/css/klmvhj.html world war 2 prisoner of war] [http://www.salona-yachts.eu/misc/gqttkc.html partial hip replacements] [http://www.easypayinfo.com/subscribe/tmp/uugmns.html map of dade county florida] [http://www.farmelco.hu/test/css/flmocr.html painter 9 brushes] [http://www.lowell.edu/styles/old_style/css/adftor.html jr wrestling] [http://2001.c3.hu/mas/cukqai.html 1st priority federal credit union] [http://kom-pas.de/3xcms/config/hkatuploads/images/hpkvia.html kitchen designs plans] [http://maps.my2gig.com/cache/qqwbws.html the christies] [http://www.plurpage.com/classifieds/cache/fcemif.html paris hilton new perfume] [http://kristinlyseggen.com/gallery/1documentaries/7travel/wilacj.html rpg freeware game] [http://mkatzenbach.de/Website_MK_alt/content/cache/dir/end001/diwcot.html insurance terminology definitions] [http://www.olemissfans.com/chatpro/image/odfidc.html jobs in west memphis arkansas] [http://maps.my2gig.com/cache/ikoxiw.html ugly animal pic] [http://activeimage.c3.hu/css/pbbnma.html e learning pdf skill] [http://kom-pas.de/3xcms/config/hkatuploads/images/umgkqt.html stockholder shareholder] [http://www.salona-yachts.eu/misc/gfxfqj.html profit margin ratios] [http://www.easypayinfo.com/subscribe/tmp/xcgkht.html linear motion slides] [http://www.stillwaterhomes.com/listings/images/pic/elmwbu.html tip design] [http://troniny.ovh.org/gallery/layout/anndgp.html university of pennsylvania call for papers] [http://mkatzenbach.de/Website_MK_alt/content/cache/dir/end001/bgqtfk.html 3 way lighting circuits] [http://troniny.ovh.org/gallery/layout/vlxmgp.html lining of heart chambers] [http://www.easypayinfo.com/subscribe/tmp/fqcaaw.html wood home office desk] [http://www.olemissfans.com/chatpro/image/dgvocs.html angeles city department los police] [http://www.lowell.edu/styles/old_style/css/tfvjfv.html discount soma] [http://www.plurpage.com/classifieds/cache/lugfho.html united state department of education office of civil right] [http://www.olemissfans.com/chatpro/image/nvgits.html w.a.s.p.s.] [http://www.olemissfans.com/chatpro/image/ohojqj.html studying for final] [http://maps.my2gig.com/cache/qortxm.html water sport carrier] [http://www.olemissfans.com/chatpro/image/tohthd.html made in usa jacket] [http://www.stillwaterhomes.com/listings/images/pic/lxubhc.html sellers pack] [http://2001.c3.hu/mas/pupnna.html solar powered cars pics] [http://2001.c3.hu/mas/iameml.html rca mp3 players lcd screen] [http://www.stillwaterhomes.com/listings/images/pic/bjfcip.html ora error codes] [http://www.salona-yachts.eu/misc/ajsies.html music rap songs] [http://www.easypayinfo.com/subscribe/tmp/uvotmf.html system selector] [http://www.salona-yachts.eu/misc/qsspev.html street ball move] [http://www.lowell.edu/styles/old_style/css/fesuen.html java read string from console] [http://troniny.ovh.org/gallery/layout/pqqtvj.html school closers in kent] [http://mkatzenbach.de/Website_MK_alt/content/cache/dir/end001/mcfdmm.html pet adoption in arizona] [http://www.lowell.edu/styles/old_style/css/tgqnde.html vcd players downloads] [http://www.lowell.edu/styles/old_style/css/bttcnu.html free phone ringtones] [http://www.stillwaterhomes.com/listings/images/pic/coiiwi.html 2000 greetings .com] [http://troniny.ovh.org/gallery/layout/appxej.html kansas secretary state state] [http://troniny.ovh.org/gallery/layout/nrltkm.html walt disney world collectible] [http://troniny.ovh.org/gallery/layout/pskpti.html principles of the ancient greeks] [http://mkatzenbach.de/Website_MK_alt/content/cache/dir/end001/uxkfxj.html sex humor joke] [http://www.stillwaterhomes.com/listings/images/pic/plmjgu.html lesbian flirting] [http://mkatzenbach.de/Website_MK_alt/content/cache/dir/end001/wmbrxv.html live rugby commentary] [http://www.stillwaterhomes.com/listings/images/pic/utiuau.html jump the shark tv shows] [http://www.farmelco.hu/test/css/efikrk.html asf video in html] [http://mkatzenbach.de/Website_MK_alt/content/cache/dir/end001/totehk.html those who forget the past] [http://www.olemissfans.com/chatpro/image/mcrqvq.html sexy teen having sex] [http://www.salona-yachts.eu/misc/diijfu.html stereo bluetooth headsets] [http://informer.siam.edu/themes/hm/dwvfkn.html buspar] [http://activeimage.c3.hu/css/avmkqx.html live spanish version] [http://www.easypayinfo.com/subscribe/tmp/fwrhtk.html radio cabs] [http://www.stillwaterhomes.com/listings/images/pic/sggtvm.html national organization of black county official] [http://www.salona-yachts.eu/misc/psfxqo.html kill bill collectors] [http://www.lowell.edu/styles/old_style/css/jvcdaq.html ny state assembly website] [http://2001.c3.hu/mas/dfrhjl.html requiring social security numbers] [http://kom-pas.de/3xcms/config/hkatuploads/images/efsguk.html sonnets format] [http://mkatzenbach.de/Website_MK_alt/content/cache/dir/end001/tleaal.html 2003 honda accord ex v6] [http://kom-pas.de/3xcms/config/hkatuploads/images/tfhkie.html zebra information for children] [http://aura.c3.hu/thumb/tahslm.html letterhead magazine] [http://maps.my2gig.com/cache/xxhnln.html mesh micron] [http://www.easypayinfo.com/subscribe/tmp/vcooid.html anaylsis of hamlet] [http://www.salona-yachts.eu/misc/acaeau.html map of downtown orlando] [http://mkatzenbach.de/Website_MK_alt/content/cache/dir/end001/omvqfk.html sounds free] [http://kom-pas.de/3xcms/config/hkatuploads/images/dsnbxf.html martin luther king i have a dream... speech] [http://2001.c3.hu/mas/bnuqbx.html airbus commercial] [http://www.plurpage.com/classifieds/cache/egpqcl.html plastic id card machine] [http://ndr.hu/rhodes/xixoxj.html evaluation program review technique] [http://www.housing.und.edu/reshalls/blog/wp-content/uploads/2007/04/img/xrhhet.html cheap buspar] [http://troniny.ovh.org/gallery/layout/ogjiiv.html air picture pressure] [http://www.stillwaterhomes.com/listings/images/pic/biqmte.html nba live 2006 tournament] [http://www.salona-yachts.eu/misc/kffahf.html lamborghini galleries] [http://www.salona-yachts.eu/misc/cflpnf.html international business guidelines] [http://kristinlyseggen.com/gallery/1documentaries/7travel/rsjsok.html titus county] [http://mkatzenbach.de/Website_MK_alt/content/cache/dir/end001/dmaepl.html san diego career fairs] [http://www.plurpage.com/classifieds/cache/usfnig.html pro tect security] [http://www.olemissfans.com/chatpro/image/hdislh.html pacific specialty ins] [http://www.systemsupport.und.edu/cache/avatars/emo/lciimh.html serial 2000 program] [http://kristinlyseggen.com/gallery/1documentaries/7travel/tejinc.html acoustic christian songs] [http://2001.c3.hu/mas/wjxsgv.html love to grab] [http://troniny.ovh.org/gallery/layout/pfpkid.html new york city marketing firm] [http://www.systemsupport.und.edu/cache/avatars/emo/klpemo.html 98se service pack] [http://mkatzenbach.de/Website_MK_alt/content/cache/dir/end001/wigfvr.html philosophy of discipline] [http://www.farmelco.hu/test/css/hdwuai.html a shooting star in the sky] [http://www.easypayinfo.com/subscribe/tmp/utsetm.html advertising television and radio production] [http://troniny.ovh.org/gallery/layout/kkbmaj.html need explanation] [http://activeimage.c3.hu/css/gccjii.html rent a car in russia] [http://www.olemissfans.com/chatpro/image/dkekan.html ont car rental] [http://www.stillwaterhomes.com/listings/images/pic/gxekvv.html net design thailand] [http://maps.my2gig.com/cache/qrkovl.html as you would be] [http://maps.my2gig.com/cache/lgkesu.html mercedes benz replacement part] [http://troniny.ovh.org/gallery/layout/iscopr.html 6th grade math question] [http://troniny.ovh.org/gallery/layout/medwlr.html lil jon mp3] [http://2001.c3.hu/mas/otpiba.html 2 pac california lyric]  
{{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"[]