Shredder: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Creation: Unicodifying, replaced: [[Image: → [[File: (14))
 
(8 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[[File:spinnybladesicon.png|thumb|right]]
{{lang|Shredder}}
'''Shredders''' are spinning blades in [[Portal 2]] that destroy objects and players dropped into them. They function just like [[pit (Portal 2)|pits]] and [[slime]], but are [[Factory (Portal 2 theme)|factory themed]].
[[File:Shredders.jpg|thumb|right|A shredder in [[Portal 2]].]]
'''Shredders''' (a.k.a. '''grinders''') are spinning blades in [[Portal 2]] that destroy objects and players dropped into them. They function just like [[pit (Portal 2)|bottomless pits]] and [[slime|deadly goo]], but are [[Factory (Portal 2 theme)|factory themed]].


==Creating Shredders==
==Creation==
1. Create a long, thin brush. Tie it to a [[func_rotating]] entity with the following settings:
{{note|Although the shredder model has rotating animations, there is a "pop" every time the animation is about to loop.  For this reason, the method below is recommended.}}
 
1. Create a new map file to hold the shredder instance.
 
2. Create a long, thin brush. Tie it to a [[func_rotating]] entity with the following settings:


::{| class=standard-table
::{| class=standard-table
Line 13: Line 18:
|}
|}


2. Create another long, thin brush. Tie it to a [[func_rotating]] entity with the following settings:
3. Create another long, thin brush. Tie it to a [[func_rotating]] entity with the following settings:


::{| class=standard-table
::{| class=standard-table
Line 23: Line 28:
|}
|}


3. Create a [[prop_dynamic_override]] entity with the following settings:
4. Create a [[prop_dynamic]] entity with the following settings:
::{| class=standard-table
::{| class=standard-table
!  Property Name || Value
!  Property Name || Value
Line 35: Line 40:




4. Create a [[prop_dynamic_override]] entity with the following settings:
5. Create a [[prop_dynamic]] entity with the following settings:
::{| class=standard-table
::{| class=standard-table
!  Property Name || Value
!  Property Name || Value
Line 46: Line 51:
|}
|}


5. Position the props so that the teeth interlock and the brush entities are in the center of their respective props.
6. Position the props so that the teeth interlock and the brush entities are in the center of their respective props.


6. Create a <code>256x1024x128</code> brush where things would fall into it. Tie the brush to a [[trigger_hurt]] entity with the following settings:
7. Create a <code>256×1024×128</code> brush where things would fall into it. Tie the brush to a [[trigger_hurt]] entity with the following settings:
::{| class=standard-table
::{| class=standard-table
!  Property Name || Value
!  Property Name || Value
Line 54: Line 59:
| Name || shredder1_trigger_hurt
| Name || shredder1_trigger_hurt
|-
|-
| Damage || 500
| Damage || 1000
|-
|-
| Damage Cap || 500
| Damage Cap || 1000
|-
|-
| Damage Type || CRUSH
| Damage Type || CRUSH
|}
|}


7. Create a brush in front of that brush and tie it to a [[trigger_multiple]] entity with the following settings:
8. Create a brush in front of that brush and tie it to a [[trigger_multiple]] entity with the following settings:
::{| class=standard-table
::{| class=standard-table
!  Property Name || Value
!  Property Name || Value
Line 69: Line 74:
| Delay Before Reset || 5
| Delay Before Reset || 5
|}
|}
and the following outputs:
Tick the "Physics Objects" flag and add the following output:
::{| class=standard-table
::{| class=standard-table
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
|-
| [[Image:Io11.png]] || OnTrigger || !activator || Dissolves || || 0.00 || No
| [[File:Io11.png]] || OnTrigger || !activator || Dissolve || || 0.00 || No
|}
 
8. Create ''another'' brush in front of that brush and tie it to a [[trigger_multiple]] entity with the following settings:
::{| class=standard-table
!  Property Name || Value
|-
| Name || shredder1_destructor
|-
|-
| Delay Before Reset || 5
| [[File:Io11.png]] || OnTrigger || !activator || SelfDestructImmediately || || 0.00 || No
|}
and the following outputs:
::{| class=standard-table
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
| [[Image:Io11.png]] || OnTrigger || !activator || SelfDestructImmediately || || 0.00 || No
|}
|}


Line 101: Line 93:
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
|-
| [[Image:Io11.png]] || OnTrigger || shredder1_trigger_hurt || Enable || || 0.00 || No
| [[File:Io11.png]] || OnTrigger || shredder1_trigger_hurt || Enable || || 0.00 || No
|-
| [[Image:Io11.png]] || OnTrigger || shredder1_dissolver || Enable || || 0.00 || No
|-
|-
| [[Image:Io11.png]] || OnTrigger || shredder1_destructor || Enable || || 0.00 || No
| [[File:Io11.png]] || OnTrigger || shredder1_dissolver || Enable || || 0.00 || No
|-
|-
| [[Image:Io11.png]] || OnTrigger || shredder1_axle_left || StartForward || || 0.00 || No
| [[File:Io11.png]] || OnTrigger || shredder1_axle_left || StartForward || || 0.00 || No
|-
|-
| [[Image:Io11.png]] || OnTrigger || shredder1_axle_right || StartForward || || 0.25 || No
| [[File:Io11.png]] || OnTrigger || shredder1_axle_right || StartForward || || 0.25 || No
|}
|}
10. Create a [[logic_relay]] with the following settings:
10. Create a [[logic_relay]] with the following settings:
Line 121: Line 111:
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
|-
| [[Image:Io11.png]] || OnTrigger || shredder1_trigger_hurt || Disable || || 0.25 || No
| [[File:Io11.png]] || OnTrigger || shredder1_trigger_hurt || Disable || || 0.25 || No
|-
| [[Image:Io11.png]] || OnTrigger || shredder1_dissolver || Disable || || 0.00 || No
|-
|-
| [[Image:Io11.png]] || OnTrigger || shredder1_destructor || Disable || || 0.00 || No
| [[File:Io11.png]] || OnTrigger || shredder1_dissolver || Disable || || 0.00 || No
|-
|-
| [[Image:Io11.png]] || OnTrigger || shredder1_axle_left || Stop || || 0.00 || No
| [[File:Io11.png]] || OnTrigger || shredder1_axle_left || Stop || || 0.00 || No
|-
|-
| [[Image:Io11.png]] || OnTrigger || shredder1_axle_right || Stop || || 0.25 || No
| [[File:Io11.png]] || OnTrigger || shredder1_axle_right || Stop || || 0.25 || No
|}
|}
11. Create a [[func_instance_io_proxy]] with the following settings:
11. Create a [[func_instance_io_proxy]] with the following settings:
Line 141: Line 129:
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
|-
| [[Image:Io11.png]] || OnProxyRelay1 || shredder1_relay_on || Trigger || || 0.00 || No
| [[File:Io11.png]] || OnProxyRelay || shredder1_relay_on || Trigger || || 0.00 || No
|-
|-
| [[Image:Io11.png]] || OnProxyRelay2 || shredder1_relay_off || Trigger || || 0.00 || No
| [[File:Io11.png]] || OnProxyRelay || shredder1_relay_off || Trigger || || 0.00 || No
|}
|}
12. Trigger OnProxyRelay1 on shredder1_proxy to turn the shredder on and OnProxyRelay2 to turn the shredder off.


== See also ==
12. Save and close the file.
* [[Portal 2 Level Creation]]
 
To use, create a [[func_instance]] in your map and set the VMF filename to the name of the file you saved your shredder instance in.  Then use the following outputs to turn the shredder on or off:
 
::{| class=standard-table
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
| [[File:Io11.png]] || &lt;''on condition''&gt; || &lt;''Fix-up Name of the func_instance''&gt; || instance:shredder1_relay_on;Trigger || || 0.00 || No
|-
| [[File:Io11.png]] || &lt;''off condition''&gt; || &lt;''Fix-up Name of the func_instance''&gt; || instance:shredder1_relay_off;Trigger || || 0.00 || No
|}


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

Latest revision as of 12:52, 8 January 2024

English (en)Русский (ru)中文 (zh)Translate (Translate)
A shredder in Portal 2.

Shredders (a.k.a. grinders) are spinning blades in Portal 2 that destroy objects and players dropped into them. They function just like bottomless pits and deadly goo, but are factory themed.

Creation

Note.pngNote:Although the shredder model has rotating animations, there is a "pop" every time the animation is about to loop. For this reason, the method below is recommended.

1. Create a new map file to hold the shredder instance.

2. Create a long, thin brush. Tie it to a func_rotating entity with the following settings:

Property Name Value
Name shredder1_left_axle
Blocking Damage 500

3. Create another long, thin brush. Tie it to a func_rotating entity with the following settings:

Property Name Value
Name shredder1_right_axle
Blocking Damage 500

4. Create a prop_dynamic entity with the following settings:

Property Name Value
Name shredder1_left
Parent shredder1_left_axle
World Model models/props_gameplay/shredder_left_b.mdl


5. Create a prop_dynamic entity with the following settings:

Property Name Value
Name shredder1_right
Parent shredder1_right_axle
World Model models/props_gameplay/shredder_right_b.mdl

6. Position the props so that the teeth interlock and the brush entities are in the center of their respective props.

7. Create a 256×1024×128 brush where things would fall into it. Tie the brush to a trigger_hurt entity with the following settings:

Property Name Value
Name shredder1_trigger_hurt
Damage 1000
Damage Cap 1000
Damage Type CRUSH

8. Create a brush in front of that brush and tie it to a trigger_multiple entity with the following settings:

Property Name Value
Name shredder1_dissolver
Delay Before Reset 5

Tick the "Physics Objects" flag and add the following output:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger !activator Dissolve 0.00 No
Io11.png OnTrigger !activator SelfDestructImmediately 0.00 No

9. Create a logic_relay with the following settings:

Property Name Value
Name shredder1_relay_on

and the following outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger shredder1_trigger_hurt Enable 0.00 No
Io11.png OnTrigger shredder1_dissolver Enable 0.00 No
Io11.png OnTrigger shredder1_axle_left StartForward 0.00 No
Io11.png OnTrigger shredder1_axle_right StartForward 0.25 No

10. Create a logic_relay with the following settings:

Property Name Value
Name shredder1_relay_off

and the following outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger shredder1_trigger_hurt Disable 0.25 No
Io11.png OnTrigger shredder1_dissolver Disable 0.00 No
Io11.png OnTrigger shredder1_axle_left Stop 0.00 No
Io11.png OnTrigger shredder1_axle_right Stop 0.25 No

11. Create a func_instance_io_proxy with the following settings:

Property Name Value
Name shredder1_proxy

and the following outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnProxyRelay shredder1_relay_on Trigger 0.00 No
Io11.png OnProxyRelay shredder1_relay_off Trigger 0.00 No

12. Save and close the file.

To use, create a func_instance in your map and set the VMF filename to the name of the file you saved your shredder instance in. Then use the following outputs to turn the shredder on or off:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png <on condition> <Fix-up Name of the func_instance> instance:shredder1_relay_on;Trigger 0.00 No
Io11.png <off condition> <Fix-up Name of the func_instance> instance:shredder1_relay_off;Trigger 0.00 No