Prop weighted cube: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(14 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{LanguageBar}}
[[File:portal2_cube_types.jpg|thumb|right|500px|Types of the Aperture Science Weighted Storage Cube.]]
[[File:portal2_cube_types.jpg|thumb|right|500px|Types of the Aperture Science Weighted Storage Cube.]]


{{portal2 point|prop_weighted_cube}} It represents the various kinds of Weighted storage cubes, including the Discouragement Redirection Cube that redirects [[Thermal Discouragement Beam]]s. It can be painted with [[gel]].
{{this is a|model entity|name=prop_weighted_cube|game=Portal 2}} It represents the various kinds of Weighted storage cubes, including the Discouragement Redirection Cube that redirects [[Thermal Discouragement Beam]]s. It can be painted with [[gel]].
{{note|Frankenturrets are their own entity, [[prop_monster_box]].}}
{{note|Frankenturrets are their own entity, {{ent|prop_monster_box}}.}}
{{tip|[https://github.com/TeamSpen210/HammerAddons TeamSpen210's Hammer Addons] allow this entity to accurately display all cube types in Hammer, as well as custom models.}}
{{tip|[https://github.com/TeamSpen210/HammerAddons TeamSpen210's Hammer Addons] allow this entity to accurately display all cube types in Hammer, as well as custom models.}}


==Keyvalues==
== Keyvalues ==
{{KV|Cube Type|choices|Cube model type.}}
{{KV Targetname}}
{{KV|Cube Type|intn=CubeType|choices|Cube model type.}}
:* 0 : Standard
:* 0 : Standard
:* 1 : Companion
:* 1 : Companion
Line 14: Line 16:
:* 5 : Schrödinger's Cube {{only|{{P2CE}}}}
:* 5 : Schrödinger's Cube {{only|{{P2CE}}}}
:* 6 : Custom model ({{Not in FGD}})
:* 6 : Custom model ({{Not in FGD}})
{{KV|Skin Type|choices|Which skin variant to use. Only Standard and Reflection cubes have rusted skins.}}
{{KV|Skin Type|intn=SkinType|choices|Which skin variant to use. Only Standard and Reflection cubes have rusted skins.}}
:* 0 : Clean
:* 0 : Clean
:* 1 : Rusted
:* 1 : Rusted
{{KV|model|string|nofgd=1|If Cube Type is set to 6, this is the model to use. Swap to a normal type OnMapSpawn using AddOutput to ensure gel skins behave correctly.}}
{{KV|Custom model|intn=model|string|nofgd=1|If Cube Type is set to 6, this is the model to use. Swap to a normal type OnMapSpawn using AddOutput to ensure gel skins behave correctly.}}
{{KV|Paint Power|choices|The cube's starting paint type.}}
{{KV|Paint Power|intn=PaintPower|choices|The cube's starting paint type.}}
:* 0 : Bounce
:* 0 : Bounce
:* 2 : Speed
:* 2 : Speed
:* 3 : Portal
:* 3 : Portal
:* 4 : None
:* 4 : None
{{KV|Skin (OLD)|choices|Cube skin, old method. Deprecated; use Cube Type instead. This appears to just set specific Cube Types on spawn.}}
{{KV|Skin (OLD)|intn=skin|choices|Use Cube Type instead. Cube skin, old method. This appears to just set specific Cube Types on spawn.|deprecated=1}}
:* 0 : Standard
:* 0 : Standard
:* 1 : Companion
:* 1 : Companion
:* 2 : Standard Activated
:* 2 : Standard Activated
::{{bug|Non-functional. Produces a companion cube.}}
::{{bug|hidetested=1|Non-functional. Produces a companion cube.}}
:* 3 : Reflective
:* 3 : Reflective
:* 4 : Sphere
:* 4 : Sphere
:* 5 : Antique
:* 5 : Antique
{{KV|Use new skins|boolean|Use the values in the Cube Type and Skin Type fields instead of the Skin(OLD) field.}}
{{KV|Use new skins|intn=NewSkins|boolean|Use the values in the Cube Type and Skin Type fields instead of the Skin(OLD) field.}}
{{KV|Allow [[Portal Funneling]]|boolean|Whether or not this object should auto-funnel into a portal.}}
{{KV|Allow [[Portal Funneling]]|intn=allowfunnel|boolean|Whether or not this object should auto-funnel into a portal.}}
{{KV Targetname}}
{{KV Angles}}
{{KV Reflection}}
{{KV Reflection}}


==Inputs==
== Inputs ==
{{IO|EnablePortalFunnel|Enable portal funneling behavior.}}
{{I|EnablePortalFunnel|Enable portal funneling behavior.}}
{{IO|DisablePortalFunnel|Disable portal funneling behavior.}}
{{I|DisablePortalFunnel|Disable portal funneling behavior.}}
{{IO|Dissolve|Dissolves the cube.}}
{{I|Dissolve|Dissolves the cube.}}
{{IO|SilentDissolve|Kills the cube and fires its OnFizzled output.}}
{{I|SilentDissolve|Kills the cube and fires its OnFizzled output.}}
{{IO|PreDissolveJoke|"GLaDOS make a funny about the cube". Non-functional.}}
{{I|PreDissolveJoke|Calls the VScript function <code>CoopCubeFizzle()</code> on <code>@glados</code>. Used in <code>mp_coop_multifling_1</code> when the cubes fall in the goo. Seemingly useless, as this could have been done by using FireUser inputs or just directly calling the function from the trigger.}}
{{IO|ExitDisabledState|Exits the disabled state of a reflective cube.}}
{{I|ExitDisabledState|Exits the disabled state of a reflective cube.}}
{{IO|EmitLaser|Turn laser on or off. Pass {{boolean}} 0 or 1 as parameter.|only={{P2CE}}}}
{{I|EmitLaser|Turn laser on or off.|param=boolean|only={{P2CE}}}}
{{I Targetname}}
{{I Reflection}}
{{I Reflection}}


==Outputs==
==Outputs==
{{IO|OnFizzled|Fired when a cube is fizzled.}}
{{O|OnFizzled|Fired when a cube is fizzled.}}
{{IO|OnOrangePickUp|Orange picked up the cube.}}
{{O|OnOrangePickUp|Orange picked up the cube.}}
{{IO|OnBluePickUp|Blue picked up the cube.}}
{{O|OnBluePickUp|Blue picked up the cube.}}
{{IO|OnPlayerPickup|Player picked up the cube.}}
{{O|OnPlayerPickup|Player picked up the cube.}}
{{IO|OnPhysGunDrop|Player dropped the cube.}}
{{O|OnPhysGunDrop|Player dropped the cube.}}
{{IO|OnPainted|Fired when the cube is painted with gel. {{note|In {{P2CE}}, the paint type enum value is passed as the parameter.}}}}
{{O|OnPainted|Fired when the cube is painted with gel. {{note|In {{P2CE}}, the paint type enum value is passed as the parameter.}}}}
{{IO|OnPowered|Fired when the cube is powered by a laser.|only={{P2CE}}}}
{{O|OnPowered|Fired when the cube is powered by a laser.|only={{P2CE}}}}
{{IO|OnUnpowered|Fired when the cube is no longer powered by a laser.|only={{P2CE}}}}
{{O|OnUnpowered|Fired when the cube is no longer powered by a laser.|only={{P2CE}}}}
{{O Targetname}}
 
[[Category:Prop entities|weighted cube]]

Latest revision as of 02:21, 6 June 2025

English (en)中文 (zh)Translate (Translate)
Types of the Aperture Science Weighted Storage Cube.

prop_weighted_cube is a model entity available in Portal 2 Portal 2. It represents the various kinds of Weighted storage cubes, including the Discouragement Redirection Cube that redirects Thermal Discouragement Beams. It can be painted with gel.

Note.pngNote:Frankenturrets are their own entity, prop_monster_box.
Tip.pngTip:TeamSpen210's Hammer Addons allow this entity to accurately display all cube types in Hammer, as well as custom models.

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

Cube Type (CubeType) <choices>
Cube model type.
  • 0 : Standard
  • 1 : Companion
  • 2 : Reflective
  • 3 : Sphere
  • 4 : Antique
  • 5 : Schrödinger's Cube (only in Portal 2: Community Edition)
  • 6 : Custom model (!FGD)
Skin Type (SkinType) <choices>
Which skin variant to use. Only Standard and Reflection cubes have rusted skins.
  • 0 : Clean
  • 1 : Rusted
Custom model (model) <string> !FGD
If Cube Type is set to 6, this is the model to use. Swap to a normal type OnMapSpawn using AddOutput to ensure gel skins behave correctly.
Paint Power (PaintPower) <choices>
The cube's starting paint type.
  • 0 : Bounce
  • 2 : Speed
  • 3 : Portal
  • 4 : None
Skin (OLD) (skin) <choices> Obsolete
Deprecated.
Use Cube Type instead. Cube skin, old method. This appears to just set specific Cube Types on spawn.
  • 0 : Standard
  • 1 : Companion
  • 2 : Standard Activated
Icon-Bug.pngBug:Non-functional. Produces a companion cube.
  • 3 : Reflective
  • 4 : Sphere
  • 5 : Antique
Use new skins (NewSkins) <boolean>
Use the values in the Cube Type and Skin Type fields instead of the Skin(OLD) field.
Allow Portal Funneling (allowfunnel) <boolean>
Whether or not this object should auto-funnel into a portal.
Render in Fast Reflections (drawinfastreflection) <boolean> (in all games since Portal 2)
If enabled, this entity will render in fast water reflections (i.e. when a water material specifies $reflectonlymarkedentities) and in the world impostor pass.

Inputs

EnablePortalFunnel
Enable portal funneling behavior.
DisablePortalFunnel
Disable portal funneling behavior.
Dissolve
Dissolves the cube.
SilentDissolve
Kills the cube and fires its OnFizzled output.
PreDissolveJoke
Calls the VScript function CoopCubeFizzle() on @glados. Used in mp_coop_multifling_1 when the cubes fall in the goo. Seemingly useless, as this could have been done by using FireUser inputs or just directly calling the function from the trigger.
ExitDisabledState
Exits the disabled state of a reflective cube.
EmitLaser <booleanRedirectInput/boolean> (only in Portal 2: Community Edition)
Turn laser on or off.

Reflection:

DisableDrawInFastReflection  (in all games since Portal 2)
Turns off rendering of this entity in reflections when using $reflectonlymarkedentities in water material.
EnableDrawInFastReflection  (in all games since Portal 2)
Turn on rendering of this entity in reflections when using $reflectonlymarkedentities in water material.

Outputs

OnFizzled
Fired when a cube is fizzled.
OnOrangePickUp
Orange picked up the cube.
OnBluePickUp
Blue picked up the cube.
OnPlayerPickup
Player picked up the cube.
OnPhysGunDrop
Player dropped the cube.
OnPainted
Fired when the cube is painted with gel.
Note.pngNote:In Portal 2: Community Edition, the paint type enum value is passed as the parameter.
OnPowered  (only in Portal 2: Community Edition)
Fired when the cube is powered by a laser.
OnUnpowered  (only in Portal 2: Community Edition)
Fired when the cube is no longer powered by a laser.