Giant Fan (Portal 2): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(rewrite, still needs changes, because the og creator relied on the cylinder primitive and the carve tool)
(more info, will add the arch primitive instructions later)
Line 1: Line 1:
{{Orphan|date=January 2024}}
{{Orphan|date=January 2024}}


The Giant Fan is a [[Behind the Scenes (Portal 2)|Behind the Scenes]] decoration used in co-op. The fan in the game is purely decorative and, is used to "push a lot of air". Use the fan with Pneumatic diversity vent, Maintenance lifts, catwalks, and test chambers for the BTS scenes.
The Giant Fan is a [[Behind the Scenes (Portal 2)|Behind the Scenes]] decoration used in the co-op campaign. The fan is meant to be purely decorative and is used to "push a lot of air". {{portalrev|4}} turns it into a gameplay element.


== Creating a Giant Fan ==
== Creating a Giant Fan ==


1. Select the new brush tool on your left, on the toolbar to your right change Cube -> Cylinder using the drop down menu. Next set the Number below that, to 18.
1. Select the brush tool, and in the object bar, change <code>block</code> to <code>arch</code> with the drop down menu. Then in the properties
:[[File:Hammer-Howto2.png|thumb|left|Step 1]]{{clr}}
:[[File:Hammer-Howto2.png|thumb|left|Step 1]]{{clr}}


Line 17: Line 17:
::{{workaround|Use the arch primitve instead, remember to tie it to a <code>[[func_detail]]</code>.}}
::{{workaround|Use the arch primitve instead, remember to tie it to a <code>[[func_detail]]</code>.}}


4. Place down three props; Three [[prop_static|static]], one [[prop_dynamic|dynamic]]. the dynamic prop will be the fan itself, search for "Fan" in the model browser, it is the white, huge one. The other two parts will be the fan rims, and supports. position these in a way that you see fit. Name the dynamic prop in any way you like, preferably in a way indicating it is used for the fan blades (for instance : <code>"fan_blades"</code>).
4. Place down three props; Three [[prop_static|static]], one [[prop_dynamic|dynamic]]. The dynamic prop will be the fan itself, in the "World model" property, set the model to <code>"models/props_bts/huge_fan.mdl"</code>. The other two parts will be the fan rims, and its supports. Position these in a way that you see fit. Make sure to set "Disable shadows" ("Disable Producing Cheap Shadows" in {{TeamSpen|4}}) to "Yes".


5. In order for the fan to spin; create a small 10 x 10 brush, (<code>[[Nodraw|tools/toolsodraw]]</code> texture), and press Ctrl + T to tie the brush to an entity. Make it a <code>[[func_rotating]]</code>, in the flags tab, check the axis box that corresponds to your fan direction. x -> horizontal and y/z -> for vertical. Next, move this brush to just behind the center of the fan blades. At last, to name this entity in a way preferably indicating it is used to make pther entities rotate (for instance : <code>"fan_rotator"</code>).
5. In order for the fan to spin, create a small brush near the fan with the <code>[[Nodraw|tools/toolsodraw]]</code> texture. Select the brush and press Ctrl+T to tie the brush to an entity. Make it a <code>[[func_rotating]]</code>, in the flags tab, check "Start ON" (if the fan must start enabled), "Fan Pain" and the axis box that corresponds to your fan direction ( "X Axis" -> horizontal and "Y Axis" -> vertical ). Set the maximum rotation speed to 400 and the friction to 1. At last, name this entity in a way preferably indicating it is used to make other entities rotate (for instance : <code>"fan_rotator"</code>).


6. In order for the blades to spin, they have to be parented to the <code>[[func_rotating]]</code>. This can be done by typing the name of the fan's rotator into the <code>[[prop_dynamic]]</code>'s parent field, this will cause the fan to rotate in-game.
:{{note|You can add a <code>[[trigger_hurt]]</code> spanning across the entire fan to stop players from passing through the fan.}}
 
6. In order for the blades to spin, they have to be parented to the <code>[[func_rotating]]</code>. Specify the name of the fan's rotator in the <code>[[prop_dynamic]]</code>'s parent field.


:{{warning|<code>[[func_rotating]]</code> will not rotate forever. You can use the [[Vscript]] snippet given in its dedicated page to circumvent this bug.}}
:{{warning|<code>[[func_rotating]]</code> will not rotate forever. You can use the [[Vscript]] snippet given in its dedicated page to circumvent this bug.}}


7. The last step is to add a sound.In the <code>[[func_rotating]]</code>'s properties, add a sound to the "Sound when moving" field.
7. The last step is to add a sound. In the <code>[[func_rotating]]</code>'s properties, add <code>World.LargeFanLoop</code> to the "Sound when moving" field ("Rotating sound WAV" in {{TeamSpen|4}}).


[[Category:Portal 2]]
[[Category:Portal 2]]
[[Category:Portal 2 Level Design]]
[[Category:Portal 2 Level Design]]

Revision as of 03:29, 10 May 2025

The Giant Fan is a Behind the Scenes decoration used in the co-op campaign. The fan is meant to be purely decorative and is used to "push a lot of air". Portal: Revolution Portal: Revolution turns it into a gameplay element.

Creating a Giant Fan

1. Select the brush tool, and in the object bar, change block to arch with the drop down menu. Then in the properties

Step 1

2. Next draw a 1056 x 1056 cylinder, make it at least 220 units thick.

Step 2

3. Push it into the wall that you want to put a fan in, the top should be slightly protruding with the wall. Right click and press carve.

Warning.pngWarning:The carve tool creates unstable and "messy" geometry when used with complex objects.
PlacementTip.pngWorkaround:Use the arch primitve instead, remember to tie it to a func_detail.

4. Place down three props; Three static, one dynamic. The dynamic prop will be the fan itself, in the "World model" property, set the model to "models/props_bts/huge_fan.mdl". The other two parts will be the fan rims, and its supports. Position these in a way that you see fit. Make sure to set "Disable shadows" ("Disable Producing Cheap Shadows" in TeamSpen's Hammer Addons TeamSpen's Hammer Addons) to "Yes".

5. In order for the fan to spin, create a small brush near the fan with the tools/toolsodraw texture. Select the brush and press Ctrl+T to tie the brush to an entity. Make it a func_rotating, in the flags tab, check "Start ON" (if the fan must start enabled), "Fan Pain" and the axis box that corresponds to your fan direction ( "X Axis" -> horizontal and "Y Axis" -> vertical ). Set the maximum rotation speed to 400 and the friction to 1. At last, name this entity in a way preferably indicating it is used to make other entities rotate (for instance : "fan_rotator").

Note.pngNote:You can add a trigger_hurt spanning across the entire fan to stop players from passing through the fan.

6. In order for the blades to spin, they have to be parented to the func_rotating. Specify the name of the fan's rotator in the prop_dynamic's parent field.

Warning.pngWarning:func_rotating will not rotate forever. You can use the Vscript snippet given in its dedicated page to circumvent this bug.

7. The last step is to add a sound. In the func_rotating's properties, add World.LargeFanLoop to the "Sound when moving" field ("Rotating sound WAV" in TeamSpen's Hammer Addons TeamSpen's Hammer Addons).