Info paint sprayer: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(→‎Keyvalues: added keyvalue from FGD)
m (→‎Inputs: Substituted IO templates)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[File:Sp colo tbeam paint0241.jpg|thumb|A paint sprayer in action.]]
[[File:Sp colo tbeam paint0241.jpg|thumb|250px|A paint sprayer in action.]]


{{portal2 point|info_paint_sprayer}} It generates a flow of paint or paint cleanser. There are several paint spawner [[instance]]s that you should consider using instead of creating this entity directly.
{{this is a|point entity|game=Portal 2|name=info_paint_sprayer}}  


{{note|You must enable the "Paint in map" [[worldspawn]] property before surfaces can be painted. Otherwise the paint will just disappear when it hits something.}}
==Entity description==
It generates a flow of paint or paint cleanser. There are several paint spawner [[instance]]s that you should consider using instead of creating this entity directly.
 
{{paintinmap}}


==Keyvalues==
==Keyvalues==
{{KV|Max number of blobs|integer|Max number of blobs that sprayer can spawn in the world (1-250).}}
{{KV|Max number of blobs|intn=maxblobcount|integer|Max number of blobs that sprayer can spawn in the world (1-250).}}
{{KV|Light Position Name|string|Name of the entity we want to use as blobs light position.}}
{{KV|Light Position Name|intn=light_position_name|string|Name of the entity we want to use as blobs light position.}}
{{KV|Start Active?|boolean|Start spraying paint when the map spawns.}}
{{KV|Start Active?|intn=start_active|boolean|Start spraying paint when the map spawns.}}
{{KV|Silent?|boolean|If this flag is true, blobs will only paint (no render, effect, or sound)}}
{{KV|Silent?|intn=silent|boolean|If this flag is true, blobs will only paint (no render, effect, or sound)}}
{{KV|DrawOnly?|boolean|If this flag is true, blobs will only render (no paint, effect, or sound)}}
{{KV|DrawOnly?|intn=DrawOnly|boolean|If this flag is true, blobs will only render (no paint, effect, or sound)}}
{{KV|Paint Type|choices|The type of paint sprayed.}}
{{KV|Paint Type|intn=PaintType|choices|The type of paint sprayed.}}
:* 0 : Bounce
:* 0 : Bounce
:* ''1 : Stick (scrapped wall walking paint; no effect in the released game; retconned into laser-reflection gel in dlc1)''
:* ''1 : Stick (scrapped wall walking paint; no effect in the released game; retconned into laser-reflection gel in dlc1)''
Line 17: Line 20:
:* 3 : Portal
:* 3 : Portal
:* 4 : Erase
:* 4 : Erase
{{KV|Render Mode|choices|The mode to render blobs.}}
{{KV|Render Mode|intn=RenderMode|choices|The mode to render blobs.}}
:* 0 : Blobulator
:* 0 : Blobulator
:* 1 : Fast Sphere
:* 1 : Fast Sphere
{{KV|Ambient Sound|choices|The sound to play when paint is flowing.}}
{{KV|Ambient Sound|intn=AmbientSound|choices|The sound to play when paint is flowing.}}
:* 0 : None (silent)
:* 0 : None (silent)
:* 1 : Drip
:* 1 : Drip
:* 2 : Medium Flow
:* 2 : Medium Flow
:* 3 : Heavy Flow
:* 3 : Heavy Flow
{{KV|Blobs per second|float|The number of paint blobs sprayed per second.}}
{{KV|Blobs per second|intn=blobs_per_second|float|The number of paint blobs sprayed per second.}}
{{KV|Min blob speed|float|The minimum speed of the sprayed blobs.}}
{{KV|Min blob speed|intn=min_speed|float|The minimum speed of the sprayed blobs.}}
{{KV|Max blob speed|float|The maximum speed of the sprayed blobs.}}
{{KV|Max blob speed|intn=max_speed|float|The maximum speed of the sprayed blobs.}}
{{KV|Blob spread radius|float|The starting radius of the spread of the blobs.}}
{{KV|Blob spread radius|intn=blob_spread_radius|float|The starting radius of the spread of the blobs.}}
{{KV|Blob spread angle|float|The spread of the blobs along its direction vector (in degrees).}}
{{KV|Blob spread angle|intn=blob_spread_angle|float|The spread of the blobs along its direction vector (in degrees).}}
{{KV|Blob streak percentage|float|The percentage of blobs that will streak (0 - 100).}}
{{KV|Blob streak percentage|intn=blob_spread_percentage|float|The percentage of blobs that will streak (0 - 100).}}
{{KV|Blob min streak time|float|The minimum time that the blobs will streak for.}}
{{KV|Blob min streak time|intn=min_streak_time|float|The minimum time that the blobs will streak for.}}
{{KV|Blob max streak time|float|The maximum time that the blobs will streak for.}}
{{KV|Blob max streak time|intn=max_streak_time|float|The maximum time that the blobs will streak for.}}
{{KV|Blob min streak speed dampen|float|The minimum speed dampening while streaking.}}
{{KV|Blob min streak speed dampen|intn=min_streak_speed_dampen|float|The minimum speed dampening while streaking.}}
{{KV|Blob max streak speed dampen|float|The maximum speed dampening while streaking.}}
{{KV|Blob max streak speed dampen|intn=max_streak_speed_dampen|float|The maximum speed dampening while streaking.}}
{{KV Targetname}}
{{KV Targetname}}
{{KV Parentname}}
{{KV Parentname}}
Line 40: Line 43:


==Inputs==
==Inputs==
{{IO|Start|Tell the paint sprayer to start spraying.}}
{{I|Start|Tell the paint sprayer to start spraying.}}
{{IO|Stop|Tell the paint sprayer to stop spraying.}}
{{I|Stop|Tell the paint sprayer to stop spraying.}}
{{IO|ChangePaintType|Change the type of paint being sprayed.|param=integer}}
{{I|ChangePaintType|Change the type of paint being sprayed.|param=integer}}
{{I Targetname}}
{{I Targetname}}
{{I Parentname}}
{{I Parentname}}

Latest revision as of 23:06, 20 April 2025

A paint sprayer in action.

info_paint_sprayer is a point entity available in Portal 2 Portal 2.

Entity description

It generates a flow of paint or paint cleanser. There are several paint spawner instances that you should consider using instead of creating this entity directly.

Note.pngNote:Gel needs to have Paint in Map set to True in worldspawn before applying on surfaces. Maps that do not use gel can save significant resources by avoiding gel code.

Keyvalues

Max number of blobs (maxblobcount) <integer>
Max number of blobs that sprayer can spawn in the world (1-250).
Light Position Name (light_position_name) <string>
Name of the entity we want to use as blobs light position.
Start Active? (start_active) <boolean>
Start spraying paint when the map spawns.
Silent? (silent) <boolean>
If this flag is true, blobs will only paint (no render, effect, or sound)
DrawOnly? (DrawOnly) <boolean>
If this flag is true, blobs will only render (no paint, effect, or sound)
Paint Type (PaintType) <choices>
The type of paint sprayed.
  • 0 : Bounce
  • 1 : Stick (scrapped wall walking paint; no effect in the released game; retconned into laser-reflection gel in dlc1)
  • 2 : Speed
  • 3 : Portal
  • 4 : Erase
Render Mode (RenderMode) <choices>
The mode to render blobs.
  • 0 : Blobulator
  • 1 : Fast Sphere
Ambient Sound (AmbientSound) <choices>
The sound to play when paint is flowing.
  • 0 : None (silent)
  • 1 : Drip
  • 2 : Medium Flow
  • 3 : Heavy Flow
Blobs per second (blobs_per_second) <float>
The number of paint blobs sprayed per second.
Min blob speed (min_speed) <float>
The minimum speed of the sprayed blobs.
Max blob speed (max_speed) <float>
The maximum speed of the sprayed blobs.
Blob spread radius (blob_spread_radius) <float>
The starting radius of the spread of the blobs.
Blob spread angle (blob_spread_angle) <float>
The spread of the blobs along its direction vector (in degrees).
Blob streak percentage (blob_spread_percentage) <float>
The percentage of blobs that will streak (0 - 100).
Blob min streak time (min_streak_time) <float>
The minimum time that the blobs will streak for.
Blob max streak time (max_streak_time) <float>
The maximum time that the blobs will streak for.
Blob min streak speed dampen (min_streak_speed_dampen) <float>
The minimum speed dampening while streaking.
Blob max streak speed dampen (max_streak_speed_dampen) <float>
The maximum speed dampening while streaking.
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

Parentname:
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

Inputs

Start
Tell the paint sprayer to start spraying.
Stop
Tell the paint sprayer to stop spraying.
ChangePaintType <integerRedirectInput/integer>
Change the type of paint being sprayed.


Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.

Outputs

See also