Files
godot-docs-l10n/sphinx/templates/getting_started/first_3d_game/07.killing_player.pot
2022-09-09 16:05:06 +02:00

188 lines
7.9 KiB
Plaintext

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2014-2022, Juan Linietsky, Ariel Manzur and the Godot community (CC-BY 3.0)
# This file is distributed under the same license as the Godot Engine package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine 3.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-09-09 16:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:4
msgid "Killing the player"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:6
msgid "We can kill enemies by jumping on them, but the player still can't die. Let's fix this."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:9
msgid "We want to detect being hit by an enemy differently from squashing them. We want the player to die when they're moving on the floor, but not if they're in the air. We could use vector math to distinguish the two kinds of collisions. Instead, though, we will use an *Area* node, which works well for hitboxes."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:16
msgid "Hitbox with the Area node"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:18
msgid "Head back to the *Player* scene and add a new *Area* node. Name it *MobDetector*. Add a *CollisionShape* node as a child of it."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:21
msgid "|image0|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:464
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:464
msgid "image0"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:23
msgid "In the *Inspector*, assign a cylinder shape to it."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:25
msgid "|image1|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:465
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:465
msgid "image1"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:27
msgid "Here is a trick you can use to make the collisions only happen when the player is on the ground or close to it. You can reduce the cylinder's height and move it up to the top of the character. This way, when the player jumps, the shape will be too high up for the enemies to collide with it."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:33
msgid "|image2|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:466
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:466
msgid "image2"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:35
msgid "You also want the cylinder to be wider than the sphere. This way, the player gets hit before colliding and being pushed on top of the monster's collision box."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:39
msgid "The wider the cylinder, the more easily the player will get killed."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:41
msgid "Next, select the *MobDetector* node again, and in the *Inspector*, turn off its *Monitorable* property. This makes it so other physics nodes cannot detect the area. The complementary *Monitoring* property allows it to detect collisions. Then, remove the *Collision -> Layer* and set the mask to the \"enemies\" layer."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:47
msgid "|image3|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:467
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:467
msgid "image3"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:49
msgid "When areas detect a collision, they emit signals. We're going to connect one to the *Player* node. In the *Node* tab, double-click the ``body_entered`` signal and connect it to the *Player*."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:53
msgid "|image4|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:468
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:468
msgid "image4"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:55
msgid "The *MobDetector* will emit ``body_entered`` when a *KinematicBody* or a *RigidBody* node enters it. As it only masks the \"enemies\" physics layers, it will only detect the *Mob* nodes."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:59
msgid "Code-wise, we're going to do two things: emit a signal we'll later use to end the game and destroy the player. We can wrap these operations in a ``die()`` function that helps us put a descriptive label on the code."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:102
msgid "Try the game again by pressing :kbd:`F5`. If everything is set up correctly, the character should die when an enemy runs into it."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:105
msgid "However, note that this depends entirely on the size and position of the *Player* and the *Mob*\\ 's collision shapes. You may need to move them and resize them to achieve a tight game feel."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:110
msgid "Ending the game"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:112
msgid "We can use the *Player*\\ 's ``hit`` signal to end the game. All we need to do is connect it to the *Main* node and stop the *MobTimer* in reaction."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:116
msgid "Open ``Main.tscn``, select the *Player* node, and in the *Node* dock, connect its ``hit`` signal to the *Main* node."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:119
msgid "|image5|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:469
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:469
msgid "image5"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:121
msgid "Get and stop the timer in the ``_on_Player_hit()`` function."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:137
msgid "If you try the game now, the monsters will stop spawning when you die, and the remaining ones will leave the screen."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:140
msgid "You can pat yourself in the back: you prototyped a complete 3D game, even if it's still a bit rough."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:143
msgid "From there, we'll add a score, the option to retry the game, and you'll see how you can make the game feel much more alive with minimalistic animations."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:148
msgid "Code checkpoint"
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:150
msgid "Here are the complete scripts for the *Main*, *Mob*, and *Player* nodes, for reference. You can use them to compare and check your code."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:153
msgid "Starting with ``Main.gd``."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:226
msgid "Next is ``Mob.gd``."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:309
msgid "Finally, the longest script, ``Player.gd``."
msgstr ""
#: ../../docs/getting_started/first_3d_game/07.killing_player.rst:462
msgid "See you in the next lesson to add the score and the retry option."
msgstr ""
#: ../../docs/<rst_epilog>:0
msgid "Translation status"
msgstr ""