Pit: Difference between revisions
mNo edit summary |
(Updating the tutorial) |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{LanguageBar}} | |||
[[File:pit.png|thumb|right|250px|"Could you just jump into that pit?" <br>- '''Wheatley''']] | [[File:pit.png|thumb|right|250px|"Could you just jump into that pit?" <br>- '''Wheatley''']] | ||
''' | '''Bottomless pits''' are used as obstacles in [[Portal 2]] and destroy objects and players that drop into them, just like [[Shredder|grinders]] and [[slime|deadly goo]]. They trigger a fade to black for players that fall into them. | ||
== Entities you need == | |||
*[[trigger_hurt]] - Using the block tool | |||
*[[player_loadsaved]] - Using to load to a recent save | |||
Optional: | |||
*[[trigger_multiple]] - For destroying objects like [[prop_weighted_cube]] | |||
== Making the deadly pit == | |||
Take your {{hammer block}} and make a block, with the trigger texture, in the place where you want the player's death. After that press {{Key|Ctrl|T}} and make the it '''trigger_hurt'''. You can see many properties but we are only going to use the {{code|Damage}}, {{code|Damage cap}} (only if you have chosen Doubling w/Forgiveness) and the {{code|damage type}} properties. | |||
Change {{code|Damage}} and {{code|Damage cap}} to 1000, and for {{code|Damage type}} to {{code|FALL}}. | |||
Create an entity with {{hammer entity}} and change it to '''player_loadsaved''', add a name like "player_loadsaved", then change {{code|Fade Duration (seconds)}} to 1, {{code|Hold Fade (seconds)}} to 5 and {{code|Reload Delay}} to 3, these parameters are used in official maps. | |||
Optionally you can create a brush to destroy objects, simply copy the '''trigger_hurt''' and move it down, if you have a fog then move it just enough that you don't see the object getting destroyed, and change the class to '''trigger_multiple'''. | |||
Set these flags to checked and the rest to unchecked: | |||
* Pushables | |||
* Physics Objects | |||
* Physics debris | |||
== Outputs == | |||
: | Add this output for '''trigger_hurt''': | ||
! | {| class=standard-table | ||
! | |||
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once | |||
|- | |- | ||
| | | [[File:Io11.png]] || OnStartTouch || player_loadsaved || Reload|| || 0.00 || No | ||
|} | |||
Add these outputs for '''trigger_multiple''': | |||
{| class=standard-table | |||
! | |||
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once | |||
|- | |- | ||
| | | [[File:Io11.png]] || OnStartTouch || !activator || SilentDissolve || || 0.00 || No | ||
|- | |- | ||
| | | [[File:Io11.png]] || OnStartTouch || !activator || Kill|| || 0.10 || No | ||
|} | |} | ||
==See also== | The {{code|SilentDissolve}} input destroys cubes and fires their {{code|OnDissolved}} output correctly, so they can respawn. The {{code|Kill}} output removes other entities that ignore {{code|SilentDissolve}}. It is delayed to ensure {{code|SilentDissolve}} executes first. | ||
*[[ | |||
If there is no output for {{code|SilentDissolve}}, the player won't able to get a new cube, this could lead to a [[W:Glossary_of_video_game_terms#softlock|soft lock]] in your level. | |||
== See also == | |||
* [[Slime Water]] - For creating deadly goo | |||
[[Category:Portal 2 Level Design]] | [[Category:Portal 2 Level Design]] | ||
[[Category:Portal 2 Tutorials]] | [[Category:Portal 2 Tutorials]] |
Latest revision as of 14:08, 12 March 2025
Bottomless pits are used as obstacles in Portal 2 and destroy objects and players that drop into them, just like grinders and deadly goo. They trigger a fade to black for players that fall into them.
Entities you need
- trigger_hurt - Using the block tool
- player_loadsaved - Using to load to a recent save
Optional:
- trigger_multiple - For destroying objects like prop_weighted_cube
Making the deadly pit
Take your Block tool and make a block, with the trigger texture, in the place where you want the player's death. After that press Ctrl+T and make the it trigger_hurt. You can see many properties but we are only going to use the Damage, Damage cap (only if you have chosen Doubling w/Forgiveness) and the damage type properties.
Change Damage and Damage cap to 1000, and for Damage type to FALL.
Create an entity with Entity tool and change it to player_loadsaved, add a name like "player_loadsaved", then change Fade Duration (seconds) to 1, Hold Fade (seconds) to 5 and Reload Delay to 3, these parameters are used in official maps.
Optionally you can create a brush to destroy objects, simply copy the trigger_hurt and move it down, if you have a fog then move it just enough that you don't see the object getting destroyed, and change the class to trigger_multiple.
Set these flags to checked and the rest to unchecked:
- Pushables
- Physics Objects
- Physics debris
Outputs
Add this output for trigger_hurt:
My Output > | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnStartTouch | player_loadsaved | Reload | 0.00 | No |
Add these outputs for trigger_multiple:
My Output > | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnStartTouch | !activator | SilentDissolve | 0.00 | No | |
![]() |
OnStartTouch | !activator | Kill | 0.10 | No |
The SilentDissolve input destroys cubes and fires their OnDissolved output correctly, so they can respawn. The Kill output removes other entities that ignore SilentDissolve. It is delayed to ensure SilentDissolve executes first.
If there is no output for SilentDissolve, the player won't able to get a new cube, this could lead to a soft lock in your level.
See also
- Slime Water - For creating deadly goo