Giant Fan (Portal 2): Difference between revisions
mNo edit summary |
Le Glaconus (talk | contribs) (formatting) |
||
(18 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{Orphan|date=May 2025}} | |||
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}} uses it as a gameplay element. | |||
== Creating a Giant Fan == | |||
1. Select the brush tool, and in the object bar, change {{mono|block}} to {{mono|arch}} with the drop down menu. | |||
:[[File:GiantFan-HowTo1.png|thumb|left|How the object bar should look like]]{{clr}} | |||
2. Next | 2. Next create a 1280 x 1280 brush and make it at least 96 units thick. Replicate the properties from the screenshot. Remember to tie it to a {{ent|func_detail}}. | ||
:{{tip|If the fan is supposed to be vertical, you can temporarily check "Reorient primitives on creation in the active 2D view" in the 2D view options.}} | |||
[[File: | :[[File:GiantFan-HowTo2.png|thumb|left|The arch properties]]{{clr}} | ||
= | 3. Place down a {{ent|prop_dynamic}} at the center, set its "World model" to {{path|icon=file|models/props_bts/huge_fan|mdl}} and set "Disable shadows" to {{mono|Yes}} ("Disable Producing Cheap Shadows" in {{TeamSpen|4}}). In the same position, create a {{ent|prop_static}} and set its model to {{path|icon=file|models/props_bts/huge_fan_rim|mdl}}. | ||
:{{tip|You can use the shift key and the arrow keys keys together to place two point entities at the exact same position.}} | |||
4. You can now place the supports, simply place one or multiple {{ent|prop_static}}(s) with the {{path|icon=file|models/props_bts/huge_fan_rod|mdl}} model, and make them come from the center of the fan model. You can then place other props with the {{path|icon=file|models/props_bts/huge_fan_support|mdl}} model, make their "T-Junction part" come in the rod props. | |||
:{{tip|You can use {{hpp|4}}'s pivot point feature to rotate these props around the rod easily.}} | |||
:{{note|You can additionaly extend the arch and add props with the {{path|icon=file|models/props_bts/huge_fan_inner_rim|mdl}} model throughout.}} | |||
== | 5. In order for the fan to spin, create a small brush at the center of the fan prop with the {{code|preset=1|[[Nodraw|tools/toolsodraw]]}} texture. Tie the brush to {{ent|func_rotating}} by selecting it and pressing {{key|Ctrl|T}}. In the flags tab, check {{mono|"Start ON"}} (if the fan must start enabled), {{mono|"Acc/Dcc"}} and the axis corresponding to the fan's direction (only check {{mono|"X axis"}} or {{mono|"Y axis"}} if the fan is vertical, if it's horizontal, don't check any axis flag). Set the maximum rotation speed to 400, the friction to 18 and the blocking damage to 1000. At last, name this entity in a way preferably indicating that it is used to make other entities rotate (for instance : {{code|preset=2|"fan_rotator"}}). | ||
:{{note|You can add a {{ent|trigger_hurt}} spanning across the entire fan to be certified players cannot pass through the fan.}} | |||
6. In order for the blades to spin, parent them to the {{ent|func_rotating}}. Simply specify the name of the {{ent|func_rotating}} in the {{ent|prop_dynamic}}'s parent field. | |||
:{{warning|{{ent|func_rotating}} will not rotate forever. You can use the [[Vscript]] snippet given in its dedicated page to circumvent this bug.}} | |||
== | 7. Add an {{ent|ambient_generic}} with {{code|preset=1|World.LargeFanLoop}} as its sound name, and set the sound range to something hearable from far away (for instance, {{code|preset=1|mp_coop_fan}} uses 2348 units). Make sure to place it near the fan. | ||
:{{tip|An {{ent|env_projectedtexture}} can be placed behind the fan to create a pretty lighting effect.}} | |||
:{{tip|Additionaly, {{code|preset=1|mp_coop_fan}} makes green {{ent|env_sprite}}s with the {{path|icon=image|sprites/light_glow02}} material blink on a 0.5 seconds [[logic_timer|timer]].}} | |||
== Making the Giant Fan start/stop == | |||
Making the fan start/stop is pretty straightforward, it consists of playing additional sounds and starting/stopping the {{ent|func_rotating}} used for the fan. | |||
1. First of all, name the looping {{ent|ambient_generic}} that was created earlier (for instance : {{code|preset=2|"fan_snd_loop"}}). If the fan must start disabled, uncheck the {{mono|"Start ON"}} flag in the {{ent|func_rotating}}'s properties and set the looping {{ent|ambient_generic}} to start silent. | |||
2. Create a new {{ent|ambient_generic}}s for the stop sound, it must have the same sound range as the looping {{ent|ambient_generic}} and the {{code|preset=1|World.LargeFanStop}} sound. Check the {{mono|"Start Silent"}} and {{mono|"Is NOT Looped"}} flag. Name it in a way indicating it is used to make the stopping sound effect (for instance : {{code|preset=2|"fan_snd_stop"}}). | |||
3. Create a {{ent|logic_relay}} and name it in a way indicating it is used to make the fan stop (for instance : {{code|preset=2|"fan_stop_relay"}}). | |||
Copy these outputs in it, the example names will be used here. | |||
:{| border=1 cellpadding="2" cellspacing="1" | |||
|- align=left style="background:#DCDCDC; color:black" | |||
! | |||
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once | |||
|- | |||
| [[File:Io11.png]] || OnTrigger || {{mono|fan_rotator}} || Stop || || 0 || No | |||
|- | |||
| [[File:Io11.png]] || OnTrigger || {{mono|fan_snd_loop}} || StopSound || || 0 || No | |||
|- | |||
| [[File:Io11.png]] || OnTrigger || {{mono|fan_snd_stop}} || PlaySound || || 0 || No | |||
|} | |||
4. Create another {{ent|ambient_generic}} with the same parameters as the previous one, with the only exception being that its sound name must be {{code|preset=1|World.LargeFanStart}}. Name it in a way indicating it is used to make the starting sound effect (for instance : {{code|preset=2|"fan_snd_start"}}). | |||
5. Create another {{ent|logic_relay}} with a name indicating it is used to make the fan start (for instance : {{code|preset=2|"fan_start_relay"}}). | |||
Copy these outputs in it : | |||
:{| border=1 cellpadding="2" cellspacing="1" | |||
|- align=left style="background:#DCDCDC; color:black" | |||
! | |||
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once | |||
|- | |||
| [[File:Io11.png]] || OnTrigger || {{mono|fan_rotator}} || Start || || 0 || No | |||
|- | |||
| [[File:Io11.png]] || OnTrigger || {{mono|fan_snd_start}} || PlaySound || || 0 || No | |||
|- | |||
| [[File:Io11.png]] || OnTrigger || {{mono|fan_snd_loop}} || PlaySound || || 2 || No | |||
|} | |||
6. You can now trigger those 2 {{ent|logic_relay}} with any logic or testing element related entity. | |||
[[Category:Portal 2]] | |||
[[Category:Portal 2 Level Design]] |
Latest revision as of 08:49, 20 June 2025

You can help by

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 uses it as 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.
2. Next create a 1280 x 1280 brush and make it at least 96 units thick. Replicate the properties from the screenshot. Remember to tie it to a func_detail.
Tip:If the fan is supposed to be vertical, you can temporarily check "Reorient primitives on creation in the active 2D view" in the 2D view options.
3. Place down a prop_dynamic at the center, set its "World model" to models/props_bts/huge_fan.mdl
and set "Disable shadows" to Yes ("Disable Producing Cheap Shadows" in TeamSpen's Hammer Addons). In the same position, create a prop_static and set its model to
models/props_bts/huge_fan_rim.mdl
.
Tip:You can use the shift key and the arrow keys keys together to place two point entities at the exact same position.
4. You can now place the supports, simply place one or multiple prop_static(s) with the models/props_bts/huge_fan_rod.mdl
model, and make them come from the center of the fan model. You can then place other props with the models/props_bts/huge_fan_support.mdl
model, make their "T-Junction part" come in the rod props.
Tip:You can use
Hammer++'s pivot point feature to rotate these props around the rod easily.
Note:You can additionaly extend the arch and add props with the
models/props_bts/huge_fan_inner_rim.mdl
model throughout.
5. In order for the fan to spin, create a small brush at the center of the fan prop with the tools/toolsodraw texture. Tie the brush to func_rotating by selecting it and pressing Ctrl+T. In the flags tab, check "Start ON" (if the fan must start enabled), "Acc/Dcc" and the axis corresponding to the fan's direction (only check "X axis" or "Y axis" if the fan is vertical, if it's horizontal, don't check any axis flag). Set the maximum rotation speed to 400, the friction to 18 and the blocking damage to 1000. At last, name this entity in a way preferably indicating that it is used to make other entities rotate (for instance : "fan_rotator").
Note:You can add a trigger_hurt spanning across the entire fan to be certified players cannot pass through the fan.
6. In order for the blades to spin, parent them to the func_rotating. Simply specify the name of the func_rotating in the prop_dynamic's parent field.
Warning:func_rotating will not rotate forever. You can use the Vscript snippet given in its dedicated page to circumvent this bug.
7. Add an ambient_generic with World.LargeFanLoop as its sound name, and set the sound range to something hearable from far away (for instance, mp_coop_fan uses 2348 units). Make sure to place it near the fan.
Tip:An env_projectedtexture can be placed behind the fan to create a pretty lighting effect.
Tip:Additionaly, mp_coop_fan makes green env_sprites with the
sprites/light_glow02
material blink on a 0.5 seconds timer.
Making the Giant Fan start/stop
Making the fan start/stop is pretty straightforward, it consists of playing additional sounds and starting/stopping the func_rotating used for the fan.
1. First of all, name the looping ambient_generic that was created earlier (for instance : "fan_snd_loop"). If the fan must start disabled, uncheck the "Start ON" flag in the func_rotating's properties and set the looping ambient_generic to start silent.
2. Create a new ambient_generics for the stop sound, it must have the same sound range as the looping ambient_generic and the World.LargeFanStop sound. Check the "Start Silent" and "Is NOT Looped" flag. Name it in a way indicating it is used to make the stopping sound effect (for instance : "fan_snd_stop").
3. Create a logic_relay and name it in a way indicating it is used to make the fan stop (for instance : "fan_stop_relay"). Copy these outputs in it, the example names will be used here.
My Output > Target Entity Target Input Parameter Delay Only Once OnTrigger fan_rotator Stop 0 No OnTrigger fan_snd_loop StopSound 0 No OnTrigger fan_snd_stop PlaySound 0 No
4. Create another ambient_generic with the same parameters as the previous one, with the only exception being that its sound name must be World.LargeFanStart. Name it in a way indicating it is used to make the starting sound effect (for instance : "fan_snd_start").
5. Create another logic_relay with a name indicating it is used to make the fan start (for instance : "fan_start_relay"). Copy these outputs in it :
My Output > Target Entity Target Input Parameter Delay Only Once OnTrigger fan_rotator Start 0 No OnTrigger fan_snd_start PlaySound 0 No OnTrigger fan_snd_loop PlaySound 2 No
6. You can now trigger those 2 logic_relay with any logic or testing element related entity.